mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 02:09:59 +00:00
Fixed: Rejections custom filter for Interactive Search (now Rejections Count)
This commit is contained in:
parent
7f1497974f
commit
baa6972a62
1 changed files with 29 additions and 2 deletions
|
@ -80,6 +80,33 @@ export const defaultState = {
|
||||||
|
|
||||||
// Default to false
|
// Default to false
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
rejectionCount: function(item, value, type) {
|
||||||
|
const rejectionCount = item.rejections.length;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case filterTypes.EQUAL:
|
||||||
|
return rejectionCount === value;
|
||||||
|
|
||||||
|
case filterTypes.GREATER_THAN:
|
||||||
|
return rejectionCount > value;
|
||||||
|
|
||||||
|
case filterTypes.GREATER_THAN_OR_EQUAL:
|
||||||
|
return rejectionCount >= value;
|
||||||
|
|
||||||
|
case filterTypes.LESS_THAN:
|
||||||
|
return rejectionCount < value;
|
||||||
|
|
||||||
|
case filterTypes.LESS_THAN_OR_EQUAL:
|
||||||
|
return rejectionCount <= value;
|
||||||
|
|
||||||
|
case filterTypes.NOT_EQUAL:
|
||||||
|
return rejectionCount !== value;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -128,8 +155,8 @@ export const defaultState = {
|
||||||
valueType: filterBuilderValueTypes.QUALITY
|
valueType: filterBuilderValueTypes.QUALITY
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'rejections',
|
name: 'rejectionCount',
|
||||||
label: 'Rejections',
|
label: 'Rejection Count',
|
||||||
type: filterBuilderTypes.NUMBER
|
type: filterBuilderTypes.NUMBER
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue