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/Activity/Blacklist/BlacklistModel.js

17 lines
453 B

var Backbone = require('backbone');
var ArtistCollection = require('../../Artist/ArtistCollection');
module.exports = Backbone.Model.extend({
//Hack to deal with Backbone 1.0's bug
initialize : function() {
this.url = function() {
return this.collection.url + '/' + this.get('id');
};
},
parse : function(model) {
model.artist = ArtistCollection.get(model.artistId);
return model;
}
});