mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Special folders also apply to RootFolder unmapped folders
This commit is contained in:
parent
26dbafee08
commit
19906e0350
3 changed files with 22 additions and 6 deletions
|
@ -99,7 +99,7 @@ namespace NzbDrone.Core.RootFolders
|
|||
throw new ArgumentException("Invalid path provided", "path");
|
||||
|
||||
var results = new List<UnmappedFolder>();
|
||||
var series = _seriesRepository.All();
|
||||
var series = _seriesRepository.All().ToList();
|
||||
|
||||
if (!_diskProvider.FolderExists(path))
|
||||
{
|
||||
|
@ -116,6 +116,12 @@ namespace NzbDrone.Core.RootFolders
|
|||
}
|
||||
}
|
||||
|
||||
if (Path.GetPathRoot(path).Equals(path, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var setToRemove = _diskProvider.SpecialFolders;
|
||||
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));
|
||||
}
|
||||
|
||||
Logger.Debug("{0} unmapped folders detected.", results.Count);
|
||||
return results;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue