1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/src/UI/Series/EpisodeModel.js
2014-01-29 22:18:37 -08:00

26 lines
695 B
JavaScript

'use strict';
define(
[
'backbone'
], function (Backbone) {
return Backbone.Model.extend({
defaults: {
seasonNumber: 0,
status : 0
},
methodUrls: {
'update': window.NzbDrone.ApiRoot + '/episodes'
},
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);
}
});
});