diff --git a/frontend/src/Episode/Summary/EpisodeFileRow.css b/frontend/src/Episode/Summary/EpisodeFileRow.css
index e694aa8c3..e7e17d240 100644
--- a/frontend/src/Episode/Summary/EpisodeFileRow.css
+++ b/frontend/src/Episode/Summary/EpisodeFileRow.css
@@ -17,6 +17,12 @@
width: 175px;
}
+.customFormatScore {
+ composes: cell from '~Components/Table/Cells/TableRowCell.css';
+
+ width: 65px;
+}
+
.actions {
composes: cell from '~Components/Table/Cells/TableRowCell.css';
diff --git a/frontend/src/Episode/Summary/EpisodeFileRow.css.d.ts b/frontend/src/Episode/Summary/EpisodeFileRow.css.d.ts
index 7352d59f7..cb57d0e8a 100644
--- a/frontend/src/Episode/Summary/EpisodeFileRow.css.d.ts
+++ b/frontend/src/Episode/Summary/EpisodeFileRow.css.d.ts
@@ -2,6 +2,7 @@
// Please do not change this file!
interface CssExports {
'actions': string;
+ 'customFormatScore': string;
'customFormats': string;
'languages': string;
'quality': string;
diff --git a/frontend/src/Episode/Summary/EpisodeFileRow.js b/frontend/src/Episode/Summary/EpisodeFileRow.js
index f23b7c9ce..31c1c93c1 100644
--- a/frontend/src/Episode/Summary/EpisodeFileRow.js
+++ b/frontend/src/Episode/Summary/EpisodeFileRow.js
@@ -11,6 +11,7 @@ import EpisodeLanguages from 'Episode/EpisodeLanguages';
import EpisodeQuality from 'Episode/EpisodeQuality';
import { icons, kinds, tooltipPositions } from 'Helpers/Props';
import formatBytes from 'Utilities/Number/formatBytes';
+import formatCustomFormatScore from 'Utilities/Number/formatCustomFormatScore';
import translate from 'Utilities/String/translate';
import MediaInfo from './MediaInfo';
import styles from './EpisodeFileRow.css';
@@ -55,6 +56,7 @@ class EpisodeFileRow extends Component {
languages,
quality,
customFormats,
+ customFormatScore,
qualityCutoffNotMet,
mediaInfo,
columns
@@ -127,6 +129,17 @@ class EpisodeFileRow extends Component {
);
}
+ if (name === 'customFormatScore') {
+ return (
+
+ {formatCustomFormatScore(customFormatScore, customFormats.length)}
+
+ );
+ }
+
if (name === 'actions') {
return (
translate('CustomFormatScore')
+ }),
+ isSortable: true,
+ isVisible: true
+ },
{
name: 'actions',
label: '',
@@ -94,6 +104,7 @@ class EpisodeSummary extends Component {
languages,
quality,
customFormats,
+ customFormatScore,
qualityCutoffNotMet,
onDeleteEpisodeFile
} = this.props;
@@ -143,6 +154,7 @@ class EpisodeSummary extends Component {
quality={quality}
qualityCutoffNotMet={qualityCutoffNotMet}
customFormats={customFormats}
+ customFormatScore={customFormatScore}
mediaInfo={mediaInfo}
columns={columns}
onDeleteEpisodeFile={onDeleteEpisodeFile}
@@ -179,6 +191,7 @@ EpisodeSummary.propTypes = {
quality: PropTypes.object,
qualityCutoffNotMet: PropTypes.bool,
customFormats: PropTypes.arrayOf(PropTypes.object),
+ customFormatScore: PropTypes.number.isRequired,
onDeleteEpisodeFile: PropTypes.func.isRequired
};
diff --git a/frontend/src/Episode/Summary/EpisodeSummaryConnector.js b/frontend/src/Episode/Summary/EpisodeSummaryConnector.js
index 530138944..15f940f2c 100644
--- a/frontend/src/Episode/Summary/EpisodeSummaryConnector.js
+++ b/frontend/src/Episode/Summary/EpisodeSummaryConnector.js
@@ -31,7 +31,8 @@ function createMapStateToProps() {
languages,
quality,
qualityCutoffNotMet,
- customFormats
+ customFormats,
+ customFormatScore
} = episodeFile;
return {
@@ -45,7 +46,8 @@ function createMapStateToProps() {
languages,
quality,
qualityCutoffNotMet,
- customFormats
+ customFormats,
+ customFormatScore
};
}
);