Fixed: Manage Tracks not showing whether language/quality meets cutoff

Signed-off-by: Robin Dadswell <robin@dadswell.email>
pull/770/head
Qstick 4 years ago
parent 17b5187729
commit 72314c4388

@ -10,6 +10,7 @@ function BookFileEditorRow(props) {
id,
path,
quality,
qualityCutoffNotMet,
isSelected,
onSelectedChange
} = props;
@ -28,6 +29,7 @@ function BookFileEditorRow(props) {
<TableRowCell>
<BookQuality
quality={quality}
isCutoffNotMet={qualityCutoffNotMet}
/>
</TableRowCell>
</TableRow>
@ -38,6 +40,7 @@ BookFileEditorRow.propTypes = {
id: PropTypes.number.isRequired,
path: PropTypes.string.isRequired,
quality: PropTypes.object.isRequired,
qualityCutoffNotMet: PropTypes.bool.isRequired,
isSelected: PropTypes.bool,
onSelectedChange: PropTypes.func.isRequired
};

@ -200,26 +200,30 @@ export const actionHandlers = handleThunks({
dispatch(set({ section, isSaving: true }));
const data = {
const requestData = {
bookFileIds
};
if (quality) {
data.quality = quality;
requestData.quality = quality;
}
const promise = createAjaxRequest({
url: '/bookFile/editor',
method: 'PUT',
dataType: 'json',
data: JSON.stringify(data)
data: JSON.stringify(requestData)
}).request;
promise.done(() => {
promise.done((data) => {
dispatch(batchActions([
...bookFileIds.map((id) => {
const props = {};
const trackFile = data.find((file) => file.id === id);
props.qualityCutoffNotMet = trackFile.qualityCutoffNotMet;
if (quality) {
props.quality = quality;
}

Loading…
Cancel
Save