1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 07:22:35 +01:00

Fixed: Peers filtering in Interactive Search results

Closes #4583
This commit is contained in:
Mark McDowall 2021-08-01 11:08:43 -07:00
parent 076c293942
commit dca2cfcecd

View File

@ -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;
}