mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-03 05:35:29 +00:00
New: Has Unmonitored Season filter for Series
This commit is contained in:
parent
1eddf3a152
commit
29176c8367
2 changed files with 23 additions and 0 deletions
|
@ -192,6 +192,22 @@ export const filterPredicates = {
|
|||
});
|
||||
|
||||
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,
|
||||
valueType: filterBuilderValueTypes.BOOL
|
||||
},
|
||||
{
|
||||
name: 'hasUnmonitoredSeason',
|
||||
label: () => translate('HasUnmonitoredSeason'),
|
||||
type: filterBuilderTypes.EXACT,
|
||||
valueType: filterBuilderValueTypes.BOOL
|
||||
},
|
||||
{
|
||||
name: 'year',
|
||||
label: () => translate('Year'),
|
||||
|
|
|
@ -752,6 +752,7 @@
|
|||
"Group": "Group",
|
||||
"HardlinkCopyFiles": "Hardlink/Copy Files",
|
||||
"HasMissingSeason": "Has Missing Season",
|
||||
"HasUnmonitoredSeason": "Has Unmonitored Season",
|
||||
"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.",
|
||||
"Here": "here",
|
||||
|
|
Loading…
Reference in a new issue