Organize & Rename work

pull/2/head
Tim Turner 8 years ago
parent 23aace6149
commit 708db1a75c

@ -85,6 +85,12 @@ namespace NzbDrone.Api.Movie
long size = 0;
bool downloaded = false;
if(model.MovieFile != null)
{
model.MovieFile.LazyLoad();
}
if (model.MovieFile != null && model.MovieFile.IsLoaded && model.MovieFile.Value != null)
{
size = model.MovieFile.Value.Size;

@ -22,7 +22,7 @@ namespace NzbDrone.Core.MediaFiles
}
public class RenameMovieFileService : IRenameMovieFileService,
//IExecute<RenameMovieFilesCommand>,
IExecute<RenameMovieFilesCommand>,
IExecute<RenameMovieCommand>
{
private readonly IMovieService _movieService;

@ -52,7 +52,7 @@
{{> ProfileSelectionPartial profiles}}
</div>
<div class="form-group col-md-2">
{{!--<div class="form-group col-md-2">
<label>Season Folders</label>
<div class="input-group">
@ -65,7 +65,7 @@
<div class="btn btn-primary slide-button"/>
</label>
</div>
</div>
</div>--}}
{{/unless}}
{{#unless existing}}

@ -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);
},

@ -5,7 +5,6 @@ var Profiles = require('../../Profile/ProfileCollection');
var RootFolders = require('../../AddSeries/RootFolders/RootFolderCollection');
var RootFolderLayout = require('../../AddSeries/RootFolders/RootFolderLayout');
var UpdateFilesSeriesView = require('./Organize/OrganizeFilesView');
var UPdateFilesMoviesView = require('./Organize/OrganizeFilesView');
var Config = require('../../Config');
module.exports = Marionette.ItemView.extend({
@ -119,11 +118,8 @@ module.exports = Marionette.ItemView.extend({
_organizeFiles : function() {
var selected = this.editorGrid.getSelectedModels();
//var updateFilesSeriesView = new UpdateFilesSeriesView({ series : selected });
//this.listenToOnce(updateFilesSeriesView, 'updatingFiles', this._afterSave);
var updateFilesMoviesView = new UpdateFilesMoviesView({ movies: selected });
this.listenToOnce(updateFilesMOviesVIew, 'updatingFiles', this._afterSave);
var updateFilesSeriesView = new UpdateFilesSeriesView({ series : selected });
this.listenToOnce(updateFilesSeriesView, 'updatingFiles', this._afterSave);
vent.trigger(vent.Commands.OpenModalCommand, updateFilesSeriesView);
}

Loading…
Cancel
Save