|
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.Providers.Jobs
|
|
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
public string Name
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get { return "Post Download Media File Scan"; }
|
|
|
|
get { return "Drop folder monitor"; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int DefaultInterval
|
|
|
|
public int DefaultInterval
|
|
|
@ -57,6 +57,8 @@ namespace NzbDrone.Core.Providers.Jobs
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var subfolder in _diskProvider.GetDirectories(dropFolder))
|
|
|
|
foreach (var subfolder in _diskProvider.GetDirectories(dropFolder))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var subfolderInfo = new DirectoryInfo(subfolder);
|
|
|
|
var subfolderInfo = new DirectoryInfo(subfolder);
|
|
|
|
|
|
|
|
|
|
|
@ -89,6 +91,11 @@ namespace NzbDrone.Core.Providers.Jobs
|
|
|
|
if (_diskProvider.GetFiles(subfolder, "*.*", SearchOption.AllDirectories).Length == 0)
|
|
|
|
if (_diskProvider.GetFiles(subfolder, "*.*", SearchOption.AllDirectories).Length == 0)
|
|
|
|
_diskProvider.DeleteFolder(subfolder, false);
|
|
|
|
_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");
|
|
|
|
Logger.Debug("New Download Scan Job completed successfully");
|
|
|
|
}
|
|
|
|
}
|
|
|
|