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:
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;
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -63,6 +63,11 @@ var Collection = PageableCollection.extend({
|
|||||||
'monitored' : [
|
'monitored' : [
|
||||||
'monitored',
|
'monitored',
|
||||||
true
|
true
|
||||||
|
],
|
||||||
|
'missing' : [
|
||||||
|
'percentOfEpisodes',
|
||||||
|
100,
|
||||||
|
'lt'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user