diff --git a/src/NzbDrone.Core/RootFolders/RootFolderService.cs b/src/NzbDrone.Core/RootFolders/RootFolderService.cs index c7bf54edf..a48466b9c 100644 --- a/src/NzbDrone.Core/RootFolders/RootFolderService.cs +++ b/src/NzbDrone.Core/RootFolders/RootFolderService.cs @@ -30,6 +30,8 @@ public class RootFolderService : IRootFolderService private readonly IConfigService _configService; private readonly Logger _logger; + private static readonly string IgnoreFolderFile = ".rrignore"; + private static readonly HashSet SpecialFolders = new HashSet { "$recycle.bin", @@ -160,6 +162,8 @@ private List GetUnmappedFolders(string path, Dictionary setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name)); + results.RemoveAll(x => Directory.GetFiles(x.Path, IgnoreFolderFile).Length > 0); + _logger.Debug("{0} unmapped folders detected.", results.Count); return results.OrderBy(u => u.Name, StringComparer.InvariantCultureIgnoreCase).ToList(); }