mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
Moved source code under src folder - massive change
This commit is contained in:
parent
2fc8123d6b
commit
5bf0e197ec
1499 changed files with 1054 additions and 1444 deletions
38
src/UI/Series/SeriesModel.js
Normal file
38
src/UI/Series/SeriesModel.js
Normal file
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue