mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-23 22:25:14 -04:00
Fixed: Get actual file names from QBittorrent API (#5226)
* Fixed: Get actual file names from QBittorrent API Previously we were assuming that the output filename was the category output dir + the torrent name. This isn't true if the torrent has been renamed or sanitized.
This commit is contained in:
@@ -73,7 +73,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
||||
return new List<ManualImportItem>();
|
||||
}
|
||||
|
||||
path = trackedDownload.DownloadItem.OutputPath.FullPath;
|
||||
path = trackedDownload.ImportItem.OutputPath.FullPath;
|
||||
}
|
||||
|
||||
if (!_diskProvider.FolderExists(path))
|
||||
@@ -305,14 +305,15 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
||||
var trackedDownload = groupedTrackedDownload.First().TrackedDownload;
|
||||
|
||||
var importMovie = groupedTrackedDownload.First().ImportResult.ImportDecision.LocalMovie.Movie;
|
||||
var outputPath = trackedDownload.ImportItem.OutputPath.FullPath;
|
||||
|
||||
if (_diskProvider.FolderExists(trackedDownload.DownloadItem.OutputPath.FullPath))
|
||||
if (_diskProvider.FolderExists(outputPath))
|
||||
{
|
||||
if (_downloadedMovieImportService.ShouldDeleteFolder(
|
||||
new DirectoryInfo(trackedDownload.DownloadItem.OutputPath.FullPath),
|
||||
new DirectoryInfo(outputPath),
|
||||
importMovie) && trackedDownload.DownloadItem.CanMoveFiles)
|
||||
{
|
||||
_diskProvider.DeleteFolder(trackedDownload.DownloadItem.OutputPath.FullPath, true);
|
||||
_diskProvider.DeleteFolder(outputPath, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user