mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 00:09:37 +02:00
Fixed: Filter by Peers in Interactive Search
This commit is contained in:
parent
09ed2ab889
commit
959d63b4eb
@ -1,5 +1,5 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, filterTypes, sortDirections } from 'Helpers/Props';
|
||||
import { filterBuilderTypes, filterBuilderValueTypes, filterTypePredicates, filterTypes, sortDirections } from 'Helpers/Props';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||
import translate from 'Utilities/String/translate';
|
||||
@ -83,6 +83,14 @@ export const defaultState = {
|
||||
return false;
|
||||
},
|
||||
|
||||
peers: function(item, value, type) {
|
||||
const predicate = filterTypePredicates[type];
|
||||
const seeders = item.seeders || 0;
|
||||
const leechers = item.leechers || 0;
|
||||
|
||||
return predicate(seeders + leechers, value);
|
||||
},
|
||||
|
||||
rejectionCount: function(item, value, type) {
|
||||
const rejectionCount = item.rejections.length;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user