|
|
@ -16,7 +16,11 @@ namespace NzbDrone.Api.System
|
|
|
|
private readonly IConfigFileProvider _configFileProvider;
|
|
|
|
private readonly IConfigFileProvider _configFileProvider;
|
|
|
|
private readonly IDatabase _database;
|
|
|
|
private readonly IDatabase _database;
|
|
|
|
|
|
|
|
|
|
|
|
public SystemModule(IAppFolderInfo appFolderInfo, IRuntimeInfo runtimeInfo, IRouteCacheProvider routeCacheProvider, IConfigFileProvider configFileProvider, IDatabase database)
|
|
|
|
public SystemModule(IAppFolderInfo appFolderInfo,
|
|
|
|
|
|
|
|
IRuntimeInfo runtimeInfo,
|
|
|
|
|
|
|
|
IRouteCacheProvider routeCacheProvider,
|
|
|
|
|
|
|
|
IConfigFileProvider configFileProvider,
|
|
|
|
|
|
|
|
IDatabase database)
|
|
|
|
: base("system")
|
|
|
|
: base("system")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_appFolderInfo = appFolderInfo;
|
|
|
|
_appFolderInfo = appFolderInfo;
|
|
|
@ -41,8 +45,10 @@ namespace NzbDrone.Api.System
|
|
|
|
StartupPath = _appFolderInfo.StartUpFolder,
|
|
|
|
StartupPath = _appFolderInfo.StartUpFolder,
|
|
|
|
AppData = _appFolderInfo.GetAppDataPath(),
|
|
|
|
AppData = _appFolderInfo.GetAppDataPath(),
|
|
|
|
OsVersion = OsInfo.Version.ToString(),
|
|
|
|
OsVersion = OsInfo.Version.ToString(),
|
|
|
|
|
|
|
|
IsMonoRuntime = OsInfo.IsMono,
|
|
|
|
IsMono = OsInfo.IsMono,
|
|
|
|
IsMono = OsInfo.IsMono,
|
|
|
|
IsLinux = OsInfo.IsLinux,
|
|
|
|
IsLinux = OsInfo.IsMono,
|
|
|
|
|
|
|
|
IsOsx = OsInfo.IsOsx,
|
|
|
|
IsWindows = OsInfo.IsWindows,
|
|
|
|
IsWindows = OsInfo.IsWindows,
|
|
|
|
Branch = _configFileProvider.Branch,
|
|
|
|
Branch = _configFileProvider.Branch,
|
|
|
|
Authentication = _configFileProvider.AuthenticationEnabled,
|
|
|
|
Authentication = _configFileProvider.AuthenticationEnabled,
|
|
|
@ -50,10 +56,8 @@ namespace NzbDrone.Api.System
|
|
|
|
SqliteVersion = _database.Version,
|
|
|
|
SqliteVersion = _database.Version,
|
|
|
|
UrlBase = _configFileProvider.UrlBase
|
|
|
|
UrlBase = _configFileProvider.UrlBase
|
|
|
|
}.AsResponse();
|
|
|
|
}.AsResponse();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Response GetRoutes()
|
|
|
|
private Response GetRoutes()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _routeCacheProvider.GetCache().Values.AsResponse();
|
|
|
|
return _routeCacheProvider.GetCache().Values.AsResponse();
|
|
|
|