mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
parent
076c293942
commit
dca2cfcecd
@ -117,6 +117,35 @@ export const defaultState = {
|
||||
case filterTypes.NOT_EQUAL:
|
||||
return rejectionCount !== value;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
peers: function(item, value, type) {
|
||||
const seeders = item.seeders || 0;
|
||||
const leechers = item.leechers || 0;
|
||||
const peers = seeders + leechers;
|
||||
|
||||
switch (type) {
|
||||
case filterTypes.EQUAL:
|
||||
return peers === value;
|
||||
|
||||
case filterTypes.GREATER_THAN:
|
||||
return peers > value;
|
||||
|
||||
case filterTypes.GREATER_THAN_OR_EQUAL:
|
||||
return peers >= value;
|
||||
|
||||
case filterTypes.LESS_THAN:
|
||||
return peers < value;
|
||||
|
||||
case filterTypes.LESS_THAN_OR_EQUAL:
|
||||
return peers <= value;
|
||||
|
||||
case filterTypes.NOT_EQUAL:
|
||||
return peers !== value;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user