|
|
|
@ -102,6 +102,8 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
|
Ensure.That(movie,() => movie).IsNotNull();
|
|
|
|
|
Ensure.That(destinationFilePath, () => destinationFilePath).IsValidPath();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var movieFilePath = movieFile.Path ?? Path.Combine(movie.Path, movieFile.RelativePath);
|
|
|
|
|
|
|
|
|
|
if (!_diskProvider.FileExists(movieFilePath))
|
|
|
|
@ -116,7 +118,10 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
|
|
|
|
|
|
_diskTransferService.TransferFile(movieFilePath, destinationFilePath, mode);
|
|
|
|
|
|
|
|
|
|
movieFile.RelativePath = movie.Path.GetRelativePathWithoutChildCheck(destinationFilePath);
|
|
|
|
|
var newMoviePath = new OsPath(destinationFilePath).Directory.FullPath.TrimEnd(Path.DirectorySeparatorChar);
|
|
|
|
|
movie.Path = newMoviePath;
|
|
|
|
|
|
|
|
|
|
movieFile.RelativePath = movie.Path.GetRelativePath(destinationFilePath);
|
|
|
|
|
|
|
|
|
|
_updateMovieFileService.ChangeFileDateForFile(movieFile, movie);
|
|
|
|
|
|
|
|
|
@ -157,7 +162,7 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
|
if (!_diskProvider.FolderExists(movieFolder))
|
|
|
|
|
{
|
|
|
|
|
CreateFolder(movieFolder);
|
|
|
|
|
newEvent.SeriesFolder = movieFolder;
|
|
|
|
|
newEvent.MovieFolder = movieFolder;
|
|
|
|
|
changed = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|