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/TrackModel.js

20 lines
531 B

var Backbone = require('backbone');
module.exports = Backbone.Model.extend({
defaults : {
albumId : 0,
status : 0
},
methodUrls : {
'update' : window.NzbDrone.ApiRoot + '/track'
},
sync : function(method, model, options) {
if (model.methodUrls && model.methodUrls[method.toLowerCase()]) {
options = options || {};
options.url = model.methodUrls[method.toLowerCase()];
}
return Backbone.sync(method, model, options);
}
});