mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-22 22:16:13 -04:00
Moved source code under src folder - massive change
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
|
||||
'underscore'
|
||||
], function (Backbone, _) {
|
||||
return Backbone.Model.extend({
|
||||
|
||||
urlRoot: window.NzbDrone.ApiRoot + '/series',
|
||||
|
||||
defaults: {
|
||||
episodeFileCount: 0,
|
||||
episodeCount : 0,
|
||||
isExisting : false,
|
||||
status : 0
|
||||
},
|
||||
|
||||
setSeasonMonitored: function (seasonNumber) {
|
||||
_.each(this.get('seasons'), function (season) {
|
||||
if (season.seasonNumber === seasonNumber) {
|
||||
season.monitored = !season.monitored;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setSeasonPass: function (seasonNumber) {
|
||||
_.each(this.get('seasons'), function (season) {
|
||||
if (season.seasonNumber >= seasonNumber) {
|
||||
season.monitored = true;
|
||||
}
|
||||
else {
|
||||
season.monitored = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user