Sonarr/src/UI/Activity/Blacklist/BlacklistModel.js

17 lines
453 B
JavaScript
Raw Normal View History

2015-02-03 01:18:45 +00:00
var Backbone = require('backbone');
var SeriesCollection = require('../../Series/SeriesCollection');
2015-02-03 01:18:45 +00:00
module.exports = Backbone.Model.extend({
2015-02-13 21:03:50 +00:00
//Hack to deal with Backbone 1.0's bug
initialize : function() {
this.url = function() {
2015-02-03 01:18:45 +00:00
return this.collection.url + '/' + this.get('id');
};
},
2015-02-13 21:03:50 +00:00
parse : function(model) {
2015-02-03 01:18:45 +00:00
model.series = SeriesCollection.get(model.seriesId);
return model;
}
});