Fixed: Manage Tracks not showing whether language/quality meets cutoff
This commit is contained in:
@@ -200,26 +200,30 @@ export const actionHandlers = handleThunks({
|
||||
|
||||
dispatch(set({ section, isSaving: true }));
|
||||
|
||||
const data = {
|
||||
const requestData = {
|
||||
trackFileIds
|
||||
};
|
||||
|
||||
if (quality) {
|
||||
data.quality = quality;
|
||||
requestData.quality = quality;
|
||||
}
|
||||
|
||||
const promise = createAjaxRequest({
|
||||
url: '/trackFile/editor',
|
||||
method: 'PUT',
|
||||
dataType: 'json',
|
||||
data: JSON.stringify(data)
|
||||
data: JSON.stringify(requestData)
|
||||
}).request;
|
||||
|
||||
promise.done(() => {
|
||||
promise.done((data) => {
|
||||
dispatch(batchActions([
|
||||
...trackFileIds.map((id) => {
|
||||
const props = {};
|
||||
|
||||
const trackFile = data.find((file) => file.id === id);
|
||||
|
||||
props.qualityCutoffNotMet = trackFile.qualityCutoffNotMet;
|
||||
|
||||
if (quality) {
|
||||
props.quality = quality;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ function createMapStateToProps() {
|
||||
return {
|
||||
path: trackFile.path,
|
||||
quality: trackFile.quality,
|
||||
qualityCutoffNotMet: trackFile.qualityCutoffNotMet,
|
||||
...track
|
||||
};
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ function TrackFileEditorRow(props) {
|
||||
trackNumber,
|
||||
path,
|
||||
quality,
|
||||
qualityCutoffNotMet,
|
||||
isSelected,
|
||||
onSelectedChange
|
||||
} = props;
|
||||
@@ -35,6 +36,7 @@ function TrackFileEditorRow(props) {
|
||||
<TableRowCell>
|
||||
<TrackQuality
|
||||
quality={quality}
|
||||
isCutoffNotMet={qualityCutoffNotMet}
|
||||
/>
|
||||
</TableRowCell>
|
||||
</TableRow>
|
||||
@@ -46,6 +48,7 @@ TrackFileEditorRow.propTypes = {
|
||||
trackNumber: PropTypes.string.isRequired,
|
||||
path: PropTypes.string.isRequired,
|
||||
quality: PropTypes.object.isRequired,
|
||||
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
||||
isSelected: PropTypes.bool,
|
||||
onSelectedChange: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user