mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-02-14 12:20:55 +02:00
PostDownloadScanJob will not fail completely if a single folder fails.
This commit is contained in:
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…
x
Reference in New Issue
Block a user