mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Add existing series uses existing path now
This commit is contained in:
parent
e2314a7b17
commit
7d4db30e38
11 changed files with 34 additions and 20 deletions
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.RootFolders
|
|||
List<RootFolder> All();
|
||||
RootFolder Add(RootFolder rootDir);
|
||||
void Remove(int rootDirId);
|
||||
List<String> GetUnmappedFolders(string path);
|
||||
List<UnmappedFolder> GetUnmappedFolders(string path);
|
||||
Dictionary<string, ulong> FreeSpaceOnDrives();
|
||||
}
|
||||
|
||||
|
@ -71,13 +71,13 @@ namespace NzbDrone.Core.RootFolders
|
|||
_rootFolderRepository.Delete(rootDirId);
|
||||
}
|
||||
|
||||
public virtual List<String> GetUnmappedFolders(string path)
|
||||
public virtual List<UnmappedFolder> GetUnmappedFolders(string path)
|
||||
{
|
||||
Logger.Debug("Generating list of unmapped folders");
|
||||
if (String.IsNullOrEmpty(path))
|
||||
throw new ArgumentException("Invalid path provided", "path");
|
||||
|
||||
var results = new List<String>();
|
||||
var results = new List<UnmappedFolder>();
|
||||
|
||||
if (!_diskProvider.FolderExists(path))
|
||||
{
|
||||
|
@ -89,7 +89,8 @@ namespace NzbDrone.Core.RootFolders
|
|||
{
|
||||
if (!_seriesProvider.SeriesPathExists(seriesFolder))
|
||||
{
|
||||
results.Add(new DirectoryInfo(seriesFolder.Normalize()).Name);
|
||||
var di = new DirectoryInfo(seriesFolder.Normalize());
|
||||
results.Add(new UnmappedFolder{ Name = di.Name, Path = di.FullName });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue