mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
moved data from Roaming to ProgramData.
Cleaned up DiskProvider
This commit is contained in:
parent
7ff1335a2e
commit
d60b863e14
33 changed files with 202 additions and 242 deletions
|
@ -16,11 +16,11 @@ namespace NzbDrone.Api.Frontend
|
|||
|
||||
private readonly string _indexPath;
|
||||
|
||||
public IndexModule(IDiskProvider diskProvider, ICacheManger cacheManger, IAppDirectoryInfo appDirectory)
|
||||
public IndexModule(IDiskProvider diskProvider, ICacheManger cacheManger, IAppFolderInfo appFolder)
|
||||
{
|
||||
_diskProvider = diskProvider;
|
||||
|
||||
_indexPath = Path.Combine(appDirectory.StartUpPath, "UI", "index.html");
|
||||
_indexPath = Path.Combine(appFolder.StartUpFolder, "UI", "index.html");
|
||||
|
||||
_indexCache = cacheManger.GetCache<string>(typeof(IndexModule));
|
||||
//Serve anything that doesn't have an extension
|
||||
|
|
|
@ -6,11 +6,11 @@ namespace NzbDrone.Api.Frontend
|
|||
{
|
||||
public class MediaCoverMapper : IMapHttpRequestsToDisk
|
||||
{
|
||||
private readonly IAppDirectoryInfo _appDirectoryInfo;
|
||||
private readonly IAppFolderInfo _appFolderInfo;
|
||||
|
||||
public MediaCoverMapper(IAppDirectoryInfo appDirectoryInfo)
|
||||
public MediaCoverMapper(IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
_appDirectoryInfo = appDirectoryInfo;
|
||||
_appFolderInfo = appFolderInfo;
|
||||
}
|
||||
|
||||
public string Map(string resourceUrl)
|
||||
|
@ -18,7 +18,7 @@ namespace NzbDrone.Api.Frontend
|
|||
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
|
||||
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
|
||||
|
||||
return Path.Combine(_appDirectoryInfo.GetAppDataPath(), path);
|
||||
return Path.Combine(_appFolderInfo.GetAppDataPath(), path);
|
||||
}
|
||||
|
||||
public bool CanHandle(string resourceUrl)
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace NzbDrone.Api.Frontend
|
|||
{
|
||||
public class StaticResourceMapper : IMapHttpRequestsToDisk
|
||||
{
|
||||
private readonly IAppDirectoryInfo _appDirectoryInfo;
|
||||
private readonly IAppFolderInfo _appFolderInfo;
|
||||
private static readonly string[] Extensions = new[] {
|
||||
".css",
|
||||
".js",
|
||||
|
@ -24,9 +24,9 @@ namespace NzbDrone.Api.Frontend
|
|||
".eot"
|
||||
};
|
||||
|
||||
public StaticResourceMapper(IAppDirectoryInfo appDirectoryInfo)
|
||||
public StaticResourceMapper(IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
_appDirectoryInfo = appDirectoryInfo;
|
||||
_appFolderInfo = appFolderInfo;
|
||||
}
|
||||
|
||||
public string Map(string resourceUrl)
|
||||
|
@ -35,7 +35,7 @@ namespace NzbDrone.Api.Frontend
|
|||
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
|
||||
|
||||
|
||||
return Path.Combine(_appDirectoryInfo.StartUpPath, "ui", path);
|
||||
return Path.Combine(_appFolderInfo.StartUpFolder, "ui", path);
|
||||
}
|
||||
|
||||
public bool CanHandle(string resourceUrl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue