Fixed: Manage Episodes not showing whether language/quality meets cutoff
This commit is contained in:
parent
894de923b9
commit
fd89e88d40
|
@ -72,6 +72,8 @@ function createMapStateToProps() {
|
|||
relativePath: episodeFile.relativePath,
|
||||
language: episodeFile.language,
|
||||
quality: episodeFile.quality,
|
||||
languageCutoffNotMet: episodeFile.languageCutoffNotMet,
|
||||
qualityCutoffNotMet: episodeFile.qualityCutoffNotMet,
|
||||
...episode
|
||||
};
|
||||
});
|
||||
|
|
|
@ -6,6 +6,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
|
|||
import TableRow from 'Components/Table/TableRow';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
import EpisodeLanguage from 'Episode/EpisodeLanguage';
|
||||
import EpisodeQuality from 'Episode/EpisodeQuality';
|
||||
import styles from './EpisodeFileEditorRow';
|
||||
|
||||
|
@ -20,6 +21,8 @@ function EpisodeFileEditorRow(props) {
|
|||
airDateUtc,
|
||||
language,
|
||||
quality,
|
||||
qualityCutoffNotMet,
|
||||
languageCutoffNotMet,
|
||||
isSelected,
|
||||
onSelectedChange
|
||||
} = props;
|
||||
|
@ -52,14 +55,16 @@ function EpisodeFileEditorRow(props) {
|
|||
/>
|
||||
|
||||
<TableRowCell>
|
||||
<Label>
|
||||
{language.name}
|
||||
</Label>
|
||||
<EpisodeLanguage
|
||||
language={language}
|
||||
isCutoffNotMet={languageCutoffNotMet}
|
||||
/>
|
||||
</TableRowCell>
|
||||
|
||||
<TableRowCell>
|
||||
<EpisodeQuality
|
||||
quality={quality}
|
||||
isCutoffNotMet={qualityCutoffNotMet}
|
||||
/>
|
||||
</TableRowCell>
|
||||
</TableRow>
|
||||
|
@ -76,6 +81,8 @@ EpisodeFileEditorRow.propTypes = {
|
|||
airDateUtc: PropTypes.string.isRequired,
|
||||
language: PropTypes.object.isRequired,
|
||||
quality: PropTypes.object.isRequired,
|
||||
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
||||
languageCutoffNotMet: PropTypes.bool.isRequired,
|
||||
isSelected: PropTypes.bool,
|
||||
onSelectedChange: PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
@ -148,30 +148,35 @@ export const actionHandlers = handleThunks({
|
|||
|
||||
dispatch(set({ section, isSaving: true }));
|
||||
|
||||
const data = {
|
||||
const requestData = {
|
||||
episodeFileIds
|
||||
};
|
||||
|
||||
if (language) {
|
||||
data.language = language;
|
||||
requestData.language = language;
|
||||
}
|
||||
|
||||
if (quality) {
|
||||
data.quality = quality;
|
||||
requestData.quality = quality;
|
||||
}
|
||||
|
||||
const promise = createAjaxRequest({
|
||||
url: '/episodeFile/editor',
|
||||
method: 'PUT',
|
||||
dataType: 'json',
|
||||
data: JSON.stringify(data)
|
||||
data: JSON.stringify(requestData)
|
||||
}).request;
|
||||
|
||||
promise.done(() => {
|
||||
promise.done((data) => {
|
||||
dispatch(batchActions([
|
||||
...episodeFileIds.map((id) => {
|
||||
const props = {};
|
||||
|
||||
const episodeFile = data.find((file) => file.id === id);
|
||||
|
||||
props.qualityCutoffNotMet = episodeFile.qualityCutoffNotMet;
|
||||
props.languageCutoffNotMet = episodeFile.languageCutoffNotMet;
|
||||
|
||||
if (language) {
|
||||
props.language = language;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue