mirror of
https://github.com/Readarr/Readarr
synced 2026-02-10 00:32:00 +01:00
28 lines
No EOL
681 B
JavaScript
28 lines
No EOL
681 B
JavaScript
var Backbone = require('backbone');
|
|
var TrackFileModel = require('./TrackFileModel');
|
|
|
|
module.exports = Backbone.Collection.extend({
|
|
url : window.NzbDrone.ApiRoot + '/episodefile',
|
|
model : TrackFileModel,
|
|
|
|
originalFetch : Backbone.Collection.prototype.fetch,
|
|
|
|
initialize : function(options) {
|
|
this.artistId = options.artistId;
|
|
this.models = [];
|
|
},
|
|
|
|
fetch : function(options) {
|
|
if (!this.artistId) {
|
|
throw 'artistId is required';
|
|
}
|
|
|
|
if (!options) {
|
|
options = {};
|
|
}
|
|
|
|
options.data = { seriesId : this.seriesId };
|
|
|
|
return this.originalFetch.call(this, options);
|
|
}
|
|
}); |