New: Missing episodes series filter

pull/3113/head
aaraujo666 8 years ago committed by Mark McDowall
parent 8e429239a8
commit a3ade09964

@ -37,6 +37,21 @@ module.exports = function() {
else if (self.state.filterType === 'contains') { else if (self.state.filterType === 'contains') {
return model.get(self.state.filterKey).toLowerCase().indexOf(self.state.filterValue.toLowerCase()) > -1; 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 { else {
return model.get(self.state.filterKey) === self.state.filterValue; return model.get(self.state.filterKey) === self.state.filterValue;
} }
@ -72,4 +87,4 @@ module.exports = function() {
}); });
return this; return this;
}; };

@ -194,6 +194,13 @@ module.exports = Marionette.Layout.extend({
tooltip : 'Ended Only', tooltip : 'Ended Only',
icon : 'icon-sonarr-series-ended', icon : 'icon-sonarr-series-ended',
callback : this._setFilter callback : this._setFilter
},
{
key : 'missing',
title : '',
tooltip : 'Missing',
icon : 'icon-sonarr-missing',
callback : this._setFilter
} }
] ]
}; };
@ -344,4 +351,4 @@ module.exports = Marionette.Layout.extend({
this.footer.show(new FooterView({ model : footerModel })); this.footer.show(new FooterView({ model : footerModel }));
} }
}); });

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

Loading…
Cancel
Save