mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
Fixed: Manage Tracks not showing whether language/quality meets cutoff
This commit is contained in:
parent
5bca13b21f
commit
7860f9ee81
3 changed files with 12 additions and 4 deletions
|
@ -200,26 +200,30 @@ export const actionHandlers = handleThunks({
|
||||||
|
|
||||||
dispatch(set({ section, isSaving: true }));
|
dispatch(set({ section, isSaving: true }));
|
||||||
|
|
||||||
const data = {
|
const requestData = {
|
||||||
trackFileIds
|
trackFileIds
|
||||||
};
|
};
|
||||||
|
|
||||||
if (quality) {
|
if (quality) {
|
||||||
data.quality = quality;
|
requestData.quality = quality;
|
||||||
}
|
}
|
||||||
|
|
||||||
const promise = createAjaxRequest({
|
const promise = createAjaxRequest({
|
||||||
url: '/trackFile/editor',
|
url: '/trackFile/editor',
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: JSON.stringify(data)
|
data: JSON.stringify(requestData)
|
||||||
}).request;
|
}).request;
|
||||||
|
|
||||||
promise.done(() => {
|
promise.done((data) => {
|
||||||
dispatch(batchActions([
|
dispatch(batchActions([
|
||||||
...trackFileIds.map((id) => {
|
...trackFileIds.map((id) => {
|
||||||
const props = {};
|
const props = {};
|
||||||
|
|
||||||
|
const trackFile = data.find((file) => file.id === id);
|
||||||
|
|
||||||
|
props.qualityCutoffNotMet = trackFile.qualityCutoffNotMet;
|
||||||
|
|
||||||
if (quality) {
|
if (quality) {
|
||||||
props.quality = quality;
|
props.quality = quality;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ function createMapStateToProps() {
|
||||||
return {
|
return {
|
||||||
path: trackFile.path,
|
path: trackFile.path,
|
||||||
quality: trackFile.quality,
|
quality: trackFile.quality,
|
||||||
|
qualityCutoffNotMet: trackFile.qualityCutoffNotMet,
|
||||||
...track
|
...track
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,6 +12,7 @@ function TrackFileEditorRow(props) {
|
||||||
trackNumber,
|
trackNumber,
|
||||||
path,
|
path,
|
||||||
quality,
|
quality,
|
||||||
|
qualityCutoffNotMet,
|
||||||
isSelected,
|
isSelected,
|
||||||
onSelectedChange
|
onSelectedChange
|
||||||
} = props;
|
} = props;
|
||||||
|
@ -35,6 +36,7 @@ function TrackFileEditorRow(props) {
|
||||||
<TableRowCell>
|
<TableRowCell>
|
||||||
<TrackQuality
|
<TrackQuality
|
||||||
quality={quality}
|
quality={quality}
|
||||||
|
isCutoffNotMet={qualityCutoffNotMet}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -46,6 +48,7 @@ TrackFileEditorRow.propTypes = {
|
||||||
trackNumber: PropTypes.string.isRequired,
|
trackNumber: PropTypes.string.isRequired,
|
||||||
path: PropTypes.string.isRequired,
|
path: PropTypes.string.isRequired,
|
||||||
quality: PropTypes.object.isRequired,
|
quality: PropTypes.object.isRequired,
|
||||||
|
qualityCutoffNotMet: PropTypes.bool.isRequired,
|
||||||
isSelected: PropTypes.bool,
|
isSelected: PropTypes.bool,
|
||||||
onSelectedChange: PropTypes.func.isRequired
|
onSelectedChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue