mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Existing series view loads again
This commit is contained in:
parent
687f8d9384
commit
525963f2a6
6 changed files with 45 additions and 21 deletions
|
@ -12,6 +12,7 @@ namespace NzbDrone.Core.RootFolders
|
|||
public interface IRootFolderService
|
||||
{
|
||||
List<RootFolder> All();
|
||||
List<RootFolder> AllWithUnmappedFolders();
|
||||
RootFolder Add(RootFolder rootDir);
|
||||
void Remove(int id);
|
||||
List<UnmappedFolder> GetUnmappedFolders(string path);
|
||||
|
@ -37,14 +38,21 @@ namespace NzbDrone.Core.RootFolders
|
|||
{
|
||||
var rootFolders = _rootFolderRepository.All().ToList();
|
||||
|
||||
return rootFolders;
|
||||
}
|
||||
|
||||
public virtual List<RootFolder> AllWithUnmappedFolders()
|
||||
{
|
||||
var rootFolders = _rootFolderRepository.All().ToList();
|
||||
|
||||
rootFolders.ForEach(folder =>
|
||||
{
|
||||
if (_diskProvider.FolderExists(folder.Path))
|
||||
{
|
||||
if (_diskProvider.FolderExists(folder.Path))
|
||||
{
|
||||
folder.FreeSpace = _diskProvider.GetAvilableSpace(folder.Path);
|
||||
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
||||
}
|
||||
});
|
||||
folder.FreeSpace = _diskProvider.GetAvilableSpace(folder.Path);
|
||||
folder.UnmappedFolders = GetUnmappedFolders(folder.Path);
|
||||
}
|
||||
});
|
||||
|
||||
return rootFolders;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue