mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-26 20:11:49 +02:00
Using Services, not Repos
This commit is contained in:
@@ -13,9 +13,10 @@ namespace NzbDrone.Core.RootFolders
|
||||
{
|
||||
List<RootFolder> All();
|
||||
RootFolder Add(RootFolder rootDir);
|
||||
void Remove(int rootDirId);
|
||||
void Remove(int id);
|
||||
List<UnmappedFolder> GetUnmappedFolders(string path);
|
||||
Dictionary<string, ulong> FreeSpaceOnDrives();
|
||||
RootFolder Get(int id);
|
||||
}
|
||||
|
||||
public class RootFolderService : IRootFolderService
|
||||
@@ -66,9 +67,9 @@ namespace NzbDrone.Core.RootFolders
|
||||
return rootFolder;
|
||||
}
|
||||
|
||||
public virtual void Remove(int rootDirId)
|
||||
public virtual void Remove(int id)
|
||||
{
|
||||
_rootFolderRepository.Delete(rootDirId);
|
||||
_rootFolderRepository.Delete(id);
|
||||
}
|
||||
|
||||
public virtual List<UnmappedFolder> GetUnmappedFolders(string path)
|
||||
@@ -123,5 +124,10 @@ namespace NzbDrone.Core.RootFolders
|
||||
|
||||
return freeSpace;
|
||||
}
|
||||
|
||||
public RootFolder Get(int id)
|
||||
{
|
||||
return _rootFolderRepository.Get(id);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user