mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-02 18:55:38 -04:00
UI Cleanup - Updated Series subtree.
This commit is contained in:
@@ -2,21 +2,27 @@ var Backbone = require('backbone');
|
||||
var EpisodeFileModel = require('./EpisodeFileModel');
|
||||
|
||||
module.exports = Backbone.Collection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/episodefile',
|
||||
model : EpisodeFileModel,
|
||||
url : window.NzbDrone.ApiRoot + '/episodefile',
|
||||
model : EpisodeFileModel,
|
||||
|
||||
originalFetch : Backbone.Collection.prototype.fetch,
|
||||
initialize : function(options){
|
||||
|
||||
initialize : function(options) {
|
||||
this.seriesId = options.seriesId;
|
||||
this.models = [];
|
||||
},
|
||||
fetch : function(options){
|
||||
if(!this.seriesId) {
|
||||
|
||||
fetch : function(options) {
|
||||
if (!this.seriesId) {
|
||||
throw 'seriesId is required';
|
||||
}
|
||||
if(!options) {
|
||||
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
options.data = {seriesId : this.seriesId};
|
||||
|
||||
options.data = { seriesId : this.seriesId };
|
||||
|
||||
return this.originalFetch.call(this, options);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user