mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Using Services, not Repos
This commit is contained in:
parent
e11f8e6369
commit
a6b66b7c90
3 changed files with 30 additions and 14 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue