Fixed: Has Missing Season not applying false condition

This commit is contained in:
Stevie Robinson 2023-10-17 08:54:39 +02:00 committed by GitHub
parent e8a47b4d0b
commit 0219f84789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -168,9 +168,10 @@ export const filterPredicates = {
}, },
hasMissingSeason: function(item, filterValue, type) { hasMissingSeason: function(item, filterValue, type) {
const predicate = filterTypePredicates[type];
const { seasons = [] } = item; const { seasons = [] } = item;
return seasons.some((season) => { const hasMissingSeason = seasons.some((season) => {
const { const {
seasonNumber, seasonNumber,
statistics = {} statistics = {}
@ -189,6 +190,8 @@ export const filterPredicates = {
episodeFileCount === 0 episodeFileCount === 0
); );
}); });
return predicate(hasMissingSeason, filterValue);
} }
}; };
@ -347,7 +350,8 @@ export const filterBuilderProps = [
{ {
name: 'hasMissingSeason', name: 'hasMissingSeason',
label: () => translate('HasMissingSeason'), label: () => translate('HasMissingSeason'),
type: filterBuilderTypes.EXACT type: filterBuilderTypes.EXACT,
valueType: filterBuilderValueTypes.BOOL
}, },
{ {
name: 'year', name: 'year',