2013-06-22 09:24:24 +03:00
|
|
|
'use strict';
|
2013-06-25 02:41:59 +03:00
|
|
|
define(
|
|
|
|
[
|
2013-08-22 06:24:50 +03:00
|
|
|
'backbone'
|
|
|
|
], function (Backbone) {
|
2013-06-25 02:41:59 +03:00
|
|
|
return Backbone.Model.extend({
|
|
|
|
|
|
|
|
defaults: {
|
|
|
|
seasonNumber: 0,
|
2013-06-29 03:35:21 +03:00
|
|
|
status : 0
|
2014-01-30 09:08:13 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
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()];
|
|
|
|
}
|
2014-01-30 09:18:37 +03:00
|
|
|
return Backbone.sync(method, model, options);
|
2013-06-25 02:41:59 +03:00
|
|
|
}
|
|
|
|
});
|
2013-03-02 22:13:23 +03:00
|
|
|
});
|