1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Organize & Rename work

This commit is contained in:
Tim Turner 2017-01-09 17:26:13 -05:00
parent 23aace6149
commit 708db1a75c
5 changed files with 18 additions and 30 deletions

View File

@ -85,6 +85,12 @@ public static MovieResource ToResource(this Core.Tv.Movie model)
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;

View File

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

View File

@ -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}}

View File

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

View File

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