You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Artist/ArtistModel.js

31 lines
833 B

var Backbone = require('backbone');
var _ = require('underscore');
module.exports = Backbone.Model.extend({
urlRoot : window.NzbDrone.ApiRoot + '/artist',
defaults : {
episodeFileCount : 0,
episodeCount : 0,
isExisting : false,
status : 0
},
setAlbumsMonitored : function(albumName) {
_.each(this.get('albums'), function(album) {
if (season.albumName === albumName) {
album.monitored = !album.monitored;
}
});
},
setAlbumPass : function(seasonNumber) {
_.each(this.get('albums'), function(album) {
if (album.seasonNumber >= seasonNumber) {
album.monitored = true;
} else {
album.monitored = false;
}
});
}
});