mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Fixed: Error checking if files should be deleted after import won't leave import in limbo
Fixes #5917 Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
2fd030bd5c
commit
a68011988e
@ -118,7 +118,9 @@ public bool ShouldDeleteFolder(DirectoryInfo directoryInfo, Movie movie)
|
||||
try
|
||||
{
|
||||
var videoFiles = _diskScanService.GetVideoFiles(directoryInfo.FullName);
|
||||
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, SearchOption.AllDirectories).Where(f => Path.GetExtension(f).Equals(".rar", StringComparison.OrdinalIgnoreCase));
|
||||
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, SearchOption.AllDirectories)
|
||||
.Where(f => Path.GetExtension(f)
|
||||
.Equals(".rar", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
foreach (var videoFile in videoFiles)
|
||||
{
|
||||
@ -151,6 +153,11 @@ public bool ShouldDeleteFolder(DirectoryInfo directoryInfo, Movie movie)
|
||||
_logger.Debug(e, "Folder {0} has already been removed", directoryInfo.FullName);
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Debug(e, "Unable to determine whether folder {0} should be removed", directoryInfo.FullName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private List<ImportResult> ProcessFolder(DirectoryInfo directoryInfo, ImportMode importMode, DownloadClientItem downloadClientItem)
|
||||
|
Loading…
Reference in New Issue
Block a user