|
|
|
@ -67,7 +67,8 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var files = _.map(this.collection.where({ rename : true }), function(model) {
|
|
|
|
|
return model.get('episodeFileId');
|
|
|
|
|
//return model.get('episodeFileId');
|
|
|
|
|
return model.get('movieFileId');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (files.length === 0) {
|
|
|
|
@ -75,26 +76,11 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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('renameMovieFiles', {
|
|
|
|
|
name : 'renameMovieFiles',
|
|
|
|
|
movieId : this.model.id,
|
|
|
|
|
files : files
|
|
|
|
|
});
|
|
|
|
|
//}
|
|
|
|
|
CommandController.Execute('renameMovieFiles', {
|
|
|
|
|
name : 'renameMovieFiles',
|
|
|
|
|
movieId : this.model.id,
|
|
|
|
|
files : files
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
vent.trigger(vent.Commands.CloseModalCommand);
|
|
|
|
|
},
|
|
|
|
|