|
|
@ -42,6 +42,9 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
var moveFileResult = new MovieFileMoveResult();
|
|
|
|
var moveFileResult = new MovieFileMoveResult();
|
|
|
|
|
|
|
|
|
|
|
|
var existingFile = localMovie.Movie.MovieFile.Value;
|
|
|
|
var existingFile = localMovie.Movie.MovieFile.Value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (existingFile != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
var movieFilePath = Path.Combine(localMovie.Movie.Path, existingFile.RelativePath);
|
|
|
|
var movieFilePath = Path.Combine(localMovie.Movie.Path, existingFile.RelativePath);
|
|
|
|
|
|
|
|
|
|
|
|
if (_diskProvider.FileExists(movieFilePath))
|
|
|
|
if (_diskProvider.FileExists(movieFilePath))
|
|
|
@ -52,6 +55,8 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
|
|
|
|
|
|
|
|
moveFileResult.OldFiles.Add(existingFile);
|
|
|
|
moveFileResult.OldFiles.Add(existingFile);
|
|
|
|
_mediaFileService.Delete(existingFile, DeleteMediaFileReason.Upgrade);
|
|
|
|
_mediaFileService.Delete(existingFile, DeleteMediaFileReason.Upgrade);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (copyOnly)
|
|
|
|
if (copyOnly)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
moveFileResult.MovieFile = _movieFileMover.CopyMovieFile(movieFile, localMovie);
|
|
|
|
moveFileResult.MovieFile = _movieFileMover.CopyMovieFile(movieFile, localMovie);
|
|
|
|