Fixed: Has Missing Season not applying false condition
This commit is contained in:
parent
e8a47b4d0b
commit
0219f84789
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue