1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

New: Missing episodes series filter

This commit is contained in:
aaraujo666 2016-06-16 03:00:36 -04:00 committed by Mark McDowall
parent 8e429239a8
commit a3ade09964
3 changed files with 29 additions and 2 deletions

View File

@ -37,6 +37,21 @@ module.exports = function() {
else if (self.state.filterType === 'contains') {
return model.get(self.state.filterKey).toLowerCase().indexOf(self.state.filterValue.toLowerCase()) > -1;
}
else if (self.state.filterType === 'lt') {
return model.get(self.state.filterKey) < self.state.filterValue;
}
else if (self.state.filterType === 'gt') {
return model.get(self.state.filterKey) > self.state.filterValue;
}
else if (self.state.filterType === 'le') {
return model.get(self.state.filterKey) <= self.state.filterValue;
}
else if (self.state.filterType === 'ge') {
return model.get(self.state.filterKey) >= self.state.filterValue;
}
else if (self.state.filterType === 'ne') {
return model.get(self.state.filterKey) !== self.state.filterValue;
}
else {
return model.get(self.state.filterKey) === self.state.filterValue;
}

View File

@ -194,6 +194,13 @@ module.exports = Marionette.Layout.extend({
tooltip : 'Ended Only',
icon : 'icon-sonarr-series-ended',
callback : this._setFilter
},
{
key : 'missing',
title : '',
tooltip : 'Missing',
icon : 'icon-sonarr-missing',
callback : this._setFilter
}
]
};

View File

@ -63,6 +63,11 @@ var Collection = PageableCollection.extend({
'monitored' : [
'monitored',
true
],
'missing' : [
'percentOfEpisodes',
100,
'lt'
]
},