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 }));
|
||||
|
||||
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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue