mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added season pass for toggling monitored status of seasons
Linked from missing
This commit is contained in:
parent
694714726c
commit
6ca17942f0
12 changed files with 316 additions and 22 deletions
|
@ -1,24 +1,25 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'Series/SeasonModel',
|
||||
'backbone.pageable'
|
||||
], function (SeasonModel, PageAbleCollection) {
|
||||
return PageAbleCollection.extend({
|
||||
'backbone',
|
||||
'Series/SeasonModel'
|
||||
], function (Backbone, SeasonModel) {
|
||||
return Backbone.Collection.extend({
|
||||
url : window.ApiRoot + '/season',
|
||||
model: SeasonModel,
|
||||
|
||||
mode: 'client',
|
||||
|
||||
state: {
|
||||
sortKey : 'seasonNumber',
|
||||
order : 1,
|
||||
pageSize: 1000000
|
||||
comparator: function (season) {
|
||||
return -season.get('seasonNumber');
|
||||
},
|
||||
|
||||
queryParams: {
|
||||
sortKey: null,
|
||||
order : null
|
||||
bySeries: function (series) {
|
||||
var filtered = this.filter(function (season) {
|
||||
return season.get('seriesId') === series;
|
||||
});
|
||||
|
||||
var SeasonCollection = require('Series/SeasonCollection');
|
||||
|
||||
return new SeasonCollection(filtered);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue