Fixed: Peers filtering in Interactive Search results

(cherry picked from commit dca2cfcecd543ef93d9cb3735fefb7dbc2277107)
pull/2337/head
Mark McDowall 3 years ago committed by ta264
parent 8522991f7b
commit 27c485581b

@ -116,6 +116,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…
Cancel
Save