New: Has Unmonitored Season filter for Series
This commit is contained in:
parent
1eddf3a152
commit
29176c8367
|
@ -192,6 +192,22 @@ export const filterPredicates = {
|
||||||
});
|
});
|
||||||
|
|
||||||
return predicate(hasMissingSeason, filterValue);
|
return predicate(hasMissingSeason, filterValue);
|
||||||
|
},
|
||||||
|
|
||||||
|
hasUnmonitoredSeason: function(item, filterValue, type) {
|
||||||
|
const predicate = filterTypePredicates[type];
|
||||||
|
const { seasons = [] } = item;
|
||||||
|
|
||||||
|
const hasUnmonitoredSeason = seasons.some((season) => {
|
||||||
|
const {
|
||||||
|
seasonNumber,
|
||||||
|
monitored
|
||||||
|
} = season;
|
||||||
|
|
||||||
|
return seasonNumber > 0 && !monitored;
|
||||||
|
});
|
||||||
|
|
||||||
|
return predicate(hasUnmonitoredSeason, filterValue);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -353,6 +369,12 @@ export const filterBuilderProps = [
|
||||||
type: filterBuilderTypes.EXACT,
|
type: filterBuilderTypes.EXACT,
|
||||||
valueType: filterBuilderValueTypes.BOOL
|
valueType: filterBuilderValueTypes.BOOL
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'hasUnmonitoredSeason',
|
||||||
|
label: () => translate('HasUnmonitoredSeason'),
|
||||||
|
type: filterBuilderTypes.EXACT,
|
||||||
|
valueType: filterBuilderValueTypes.BOOL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'year',
|
name: 'year',
|
||||||
label: () => translate('Year'),
|
label: () => translate('Year'),
|
||||||
|
|
|
@ -752,6 +752,7 @@
|
||||||
"Group": "Group",
|
"Group": "Group",
|
||||||
"HardlinkCopyFiles": "Hardlink/Copy Files",
|
"HardlinkCopyFiles": "Hardlink/Copy Files",
|
||||||
"HasMissingSeason": "Has Missing Season",
|
"HasMissingSeason": "Has Missing Season",
|
||||||
|
"HasUnmonitoredSeason": "Has Unmonitored Season",
|
||||||
"Health": "Health",
|
"Health": "Health",
|
||||||
"HealthMessagesInfoBox": "You can find more information about the cause of these health check messages by clicking the wiki link (book icon) at the end of the row, or by checking your [logs]({link}). If you have difficulty interpreting these messages then you can reach out to our support, at the links below.",
|
"HealthMessagesInfoBox": "You can find more information about the cause of these health check messages by clicking the wiki link (book icon) at the end of the row, or by checking your [logs]({link}). If you have difficulty interpreting these messages then you can reach out to our support, at the links below.",
|
||||||
"Here": "here",
|
"Here": "here",
|
||||||
|
|
Loading…
Reference in New Issue