1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

New: Custom Formats

Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
Qstick
2022-01-23 23:42:41 -06:00
committed by Mark McDowall
parent 909af6c874
commit b04b4000b8
173 changed files with 6401 additions and 1347 deletions
@@ -23,8 +23,8 @@ function HistoryDetails(props) {
const {
indexer,
releaseGroup,
preferredWordScore,
seriesMatchType,
customFormatScore,
nzbInfoUrl,
downloadClient,
downloadClientName,
@@ -65,10 +65,10 @@ function HistoryDetails(props) {
}
{
preferredWordScore && preferredWordScore !== '0' ?
customFormatScore && customFormatScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
title="Custom Format Score"
data={formatPreferredWordScore(customFormatScore)}
/> :
null
}
@@ -163,7 +163,7 @@ function HistoryDetails(props) {
if (eventType === 'downloadFolderImported') {
const {
preferredWordScore,
customFormatScore,
droppedPath,
importedPath
} = data;
@@ -197,10 +197,10 @@ function HistoryDetails(props) {
}
{
preferredWordScore && preferredWordScore !== '0' ?
customFormatScore && customFormatScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
title="Custom Format Score"
data={formatPreferredWordScore(customFormatScore)}
/> :
null
}
@@ -211,7 +211,7 @@ function HistoryDetails(props) {
if (eventType === 'episodeFileDeleted') {
const {
reason,
preferredWordScore
customFormatScore
} = data;
let reasonMessage = '';
@@ -243,10 +243,10 @@ function HistoryDetails(props) {
/>
{
preferredWordScore && preferredWordScore !== '0' ?
customFormatScore && customFormatScore !== '0' ?
<DescriptionListItem
title="Preferred Word Score"
data={formatPreferredWordScore(preferredWordScore)}
title="Custom Format Score"
data={formatPreferredWordScore(customFormatScore)}
/> :
null
}
+1 -1
View File
@@ -10,7 +10,7 @@
width: 80px;
}
.preferredWordScore {
.customFormatScore {
composes: cell from '~Components/Table/Cells/TableRowCell.css';
width: 55px;
+16 -3
View File
@@ -5,6 +5,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRow from 'Components/Table/TableRow';
import episodeEntities from 'Episode/episodeEntities';
import EpisodeFormats from 'Episode/EpisodeFormats';
import EpisodeLanguage from 'Episode/EpisodeLanguage';
import EpisodeQuality from 'Episode/EpisodeQuality';
import EpisodeTitleLink from 'Episode/EpisodeTitleLink';
@@ -61,6 +62,7 @@ class HistoryRow extends Component {
language,
languageCutoffNotMet,
quality,
customFormats,
qualityCutoffNotMet,
eventType,
sourceTitle,
@@ -164,6 +166,16 @@ class HistoryRow extends Component {
);
}
if (name === 'customFormats') {
return (
<TableRowCell key={name}>
<EpisodeFormats
formats={customFormats}
/>
</TableRowCell>
);
}
if (name === 'date') {
return (
<RelativeDateCellConnector
@@ -195,13 +207,13 @@ class HistoryRow extends Component {
);
}
if (name === 'preferredWordScore') {
if (name === 'customFormatScore') {
return (
<TableRowCell
key={name}
className={styles.preferredWordScore}
className={styles.customFormatScore}
>
{formatPreferredWordScore(data.preferredWordScore)}
{formatPreferredWordScore(data.customFormatScore)}
</TableRowCell>
);
}
@@ -269,6 +281,7 @@ HistoryRow.propTypes = {
language: PropTypes.object.isRequired,
languageCutoffNotMet: PropTypes.bool.isRequired,
quality: PropTypes.object.isRequired,
customFormats: PropTypes.arrayOf(PropTypes.object),
qualityCutoffNotMet: PropTypes.bool.isRequired,
eventType: PropTypes.string.isRequired,
sourceTitle: PropTypes.string.isRequired,