PostDownloadScanJob will not fail completely if a single folder fails.

pull/2/head
kay.one 14 years ago
parent 2a64014c96
commit 8b0c8afb81

@ -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");
}

Loading…
Cancel
Save