1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

Second Pass at rename/organize

This commit is contained in:
Tim Turner
2017-01-08 17:01:37 -05:00
parent cd4863b974
commit b5d932866a
18 changed files with 384 additions and 52 deletions
+20 -14
View File
@@ -29,12 +29,13 @@ module.exports = Marionette.Layout.extend({
},
initialize : function(options) {
this.model = options.series;
this.model = options.movie;
this.seasonNumber = options.seasonNumber;
var viewOptions = {};
viewOptions.seriesId = this.model.id;
viewOptions.seasonNumber = this.seasonNumber;
//viewOptions.seriesId = this.model.id;
//viewOptions.seasonNumber = this.seasonNumber;
viewOptions.movieId = this.model.id;
this.collection = new RenamePreviewCollection(viewOptions);
this.listenTo(this.collection, 'sync', this._showPreviews);
@@ -74,21 +75,26 @@ module.exports = Marionette.Layout.extend({
return;
}
if (this.seasonNumber) {
// if (this.seasonNumber) {
// CommandController.Execute('renameFiles', {
// name : 'renameFiles',
// movieId : this.model.id,
// //seasonNumber : this.seasonNumber,
// files : files
// });
// } else {
// CommandController.Execute('renameFiles', {
// name : 'renameFiles',
// seriesId : this.model.id,
// seasonNumber : -1,
// files : files
// });
CommandController.Execute('renameFiles', {
name : 'renameFiles',
seriesId : this.model.id,
seasonNumber : this.seasonNumber,
movieId : this.model.id,
files : files
});
} else {
CommandController.Execute('renameFiles', {
name : 'renameFiles',
seriesId : this.model.id,
seasonNumber : -1,
files : files
});
}
//}
vent.trigger(vent.Commands.CloseModalCommand);
},