New: User defined scores for each Custom Format

Brings it more into line with Sonarr preferred words
This commit is contained in:
ta264
2020-02-25 22:10:52 +00:00
parent da80793204
commit 50d6c5e61e
49 changed files with 547 additions and 791 deletions

View File

@@ -63,6 +63,15 @@ const columns = [
isSortable: true,
isVisible: true
},
{
name: 'customFormatScore',
label: React.createElement(Icon, {
name: icons.SCORE,
title: 'Custom Format score'
}),
isSortable: true,
isVisible: true
},
{
name: 'indexerFlags',
label: React.createElement(Icon, { name: icons.FLAG }),

View File

@@ -20,6 +20,14 @@
width: 100px;
}
.customFormatScore {
composes: cell from '~Components/Table/Cells/TableRowCell.css';
width: 55px;
font-weight: bold;
cursor: default;
}
.rejected,
.indexerFlags,
.download {

View File

@@ -114,6 +114,7 @@ class InteractiveSearchRow extends Component {
leechers,
quality,
customFormats,
customFormatScore,
languages,
indexerFlags,
rejections,
@@ -182,6 +183,11 @@ class InteractiveSearchRow extends Component {
/>
</TableRowCell>
<TableRowCell className={styles.customFormatScore}>
{customFormatScore > 0 && `+${customFormatScore}`}
{customFormatScore < 0 && customFormatScore}
</TableRowCell>
<TableRowCell className={styles.indexerFlags}>
{
!!indexerFlags.length &&
@@ -281,6 +287,7 @@ InteractiveSearchRow.propTypes = {
leechers: PropTypes.number,
quality: PropTypes.object.isRequired,
customFormats: PropTypes.arrayOf(PropTypes.object).isRequired,
customFormatScore: PropTypes.number.isRequired,
languages: PropTypes.arrayOf(PropTypes.object).isRequired,
rejections: PropTypes.arrayOf(PropTypes.string).isRequired,
indexerFlags: PropTypes.arrayOf(PropTypes.string).isRequired,