mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
916db8d356
Add Track and TrackFile API Resources, Add Rename Track Resource, Add GetFilesByAlbum function to Media File Service, Add Links to Artist Detail Page, Misc other UI work
20 lines
531 B
JavaScript
20 lines
531 B
JavaScript
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);
|
|
}
|
|
}); |