mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
16 lines
523 B
JavaScript
16 lines
523 B
JavaScript
var Backbone = require('backbone');
|
|
|
|
module.exports = Backbone.Model.extend({
|
|
defaults : {
|
|
seasonNumber : 0,
|
|
status : 0
|
|
},
|
|
methodUrls : {"update" : window.NzbDrone.ApiRoot + '/episode'},
|
|
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);
|
|
}
|
|
}); |