mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-27 23:16:58 -04:00
ae0df2aef0
Fixes #84
34 lines
915 B
JavaScript
34 lines
915 B
JavaScript
var Backbone = require('backbone');
|
|
var RenamePreviewModel = require('./RenamePreviewModel');
|
|
|
|
module.exports = Backbone.Collection.extend({
|
|
url : window.NzbDrone.ApiRoot + '/renameMovie',
|
|
model : RenamePreviewModel,
|
|
|
|
originalFetch : Backbone.Collection.prototype.fetch,
|
|
|
|
initialize : function(options) {
|
|
if (!options.movieId) {
|
|
throw 'movieId is required';
|
|
}
|
|
|
|
this.movieId = options.movieId;
|
|
//this.seasonNumber = options.seasonNumber;
|
|
},
|
|
|
|
fetch : function(options) {
|
|
if (!this.movieId) {
|
|
throw 'movieId is required';
|
|
}
|
|
|
|
options = options || {};
|
|
options.data = {};
|
|
options.data.movieId = this.movieId;
|
|
|
|
// if (this.seasonNumber !== undefined) {
|
|
// options.data.seasonNumber = this.seasonNumber;
|
|
//}
|
|
|
|
return this.originalFetch.call(this, options);
|
|
}
|
|
}); |