mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 13:01:28 +02:00
PostDownloadScanJob will not fail completely if a single folder fails.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Post Download Media File Scan"; }
|
||||
get { return "Drop folder monitor"; }
|
||||
}
|
||||
|
||||
public int DefaultInterval
|
||||
@@ -57,6 +57,8 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||
}
|
||||
|
||||
foreach (var subfolder in _diskProvider.GetDirectories(dropFolder))
|
||||
{
|
||||
try
|
||||
{
|
||||
var subfolderInfo = new DirectoryInfo(subfolder);
|
||||
|
||||
@@ -89,6 +91,11 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||
if (_diskProvider.GetFiles(subfolder, "*.*", SearchOption.AllDirectories).Length == 0)
|
||||
_diskProvider.DeleteFolder(subfolder, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.ErrorException("An error has occurred while importing " + subfolder, e);
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Debug("New Download Scan Job completed successfully");
|
||||
}
|
||||
|
Reference in New Issue
Block a user