mirror of
https://github.com/Readarr/Readarr
synced 2026-01-15 12:03:17 +01:00
31 lines
No EOL
832 B
JavaScript
31 lines
No EOL
832 B
JavaScript
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 (album.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;
|
|
}
|
|
});
|
|
}
|
|
}); |