mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Fixed: Error checking if files should be deleted after import won't leave import in limbo
Closes #4318
This commit is contained in:
parent
54c386dd22
commit
88ad6f9544
@ -111,7 +111,8 @@ public bool ShouldDeleteFolder(DirectoryInfo directoryInfo, Series series)
|
|||||||
{
|
{
|
||||||
var videoFiles = _diskScanService.GetVideoFiles(directoryInfo.FullName);
|
var videoFiles = _diskScanService.GetVideoFiles(directoryInfo.FullName);
|
||||||
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, SearchOption.AllDirectories).Where(f =>
|
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, SearchOption.AllDirectories).Where(f =>
|
||||||
Path.GetExtension(f).Equals(".rar", StringComparison.OrdinalIgnoreCase));
|
Path.GetExtension(f).Equals(".rar",
|
||||||
|
StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
foreach (var videoFile in videoFiles)
|
foreach (var videoFile in videoFiles)
|
||||||
{
|
{
|
||||||
@ -144,6 +145,11 @@ public bool ShouldDeleteFolder(DirectoryInfo directoryInfo, Series series)
|
|||||||
_logger.Debug(e, "Folder {0} has already been removed", directoryInfo.FullName);
|
_logger.Debug(e, "Folder {0} has already been removed", directoryInfo.FullName);
|
||||||
return false;
|
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)
|
private List<ImportResult> ProcessFolder(DirectoryInfo directoryInfo, ImportMode importMode, DownloadClientItem downloadClientItem)
|
||||||
|
Loading…
Reference in New Issue
Block a user