mirror of
https://github.com/Radarr/Radarr.git
synced 2024-06-30 17:43:59 +02:00
Compare commits
4 Commits
fb57a620da
...
15fc9e5021
Author | SHA1 | Date | |
---|---|---|---|
|
15fc9e5021 | ||
|
1e096e5702 | ||
|
e5079fc9cf | ||
|
3736be6601 |
|
@ -32,6 +32,8 @@ public class RootFolderService : IRootFolderService
|
|||
private readonly INamingConfigService _namingConfigService;
|
||||
private readonly Logger _logger;
|
||||
|
||||
private static readonly string IgnoreFolderFile = ".rrignore";
|
||||
|
||||
private static readonly HashSet<string> SpecialFolders = new HashSet<string>
|
||||
{
|
||||
"$recycle.bin",
|
||||
|
@ -185,6 +187,8 @@ private List<UnmappedFolder> GetUnmappedFolders(string path, Dictionary<int, str
|
|||
var setToRemove = SpecialFolders;
|
||||
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));
|
||||
|
||||
results.RemoveAll(x => Directory.Exists(x.Path) && Directory.GetFiles(x.Path, IgnoreFolderFile).Length > 0);
|
||||
|
||||
_logger.Debug("{0} unmapped folders detected.", results.Count);
|
||||
return results.OrderBy(u => u.Name, StringComparer.InvariantCultureIgnoreCase).ToList();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user