New: Missing episodes series filter

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

@ -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;
}
@ -72,4 +87,4 @@ module.exports = function() {
});
return this;
};
};

@ -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
}
]
};
@ -344,4 +351,4 @@ module.exports = Marionette.Layout.extend({
this.footer.show(new FooterView({ model : footerModel }));
}
});
});

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

Loading…
Cancel
Save