|
|
|
@ -27,6 +27,7 @@ using Ombi.Store.Entities;
|
|
|
|
|
using Ombi.Store.Repository;
|
|
|
|
|
using Ombi.Api.Github;
|
|
|
|
|
using Ombi.Core.Engine;
|
|
|
|
|
using Ombi.Extensions;
|
|
|
|
|
using Ombi.Schedule;
|
|
|
|
|
using Quartz;
|
|
|
|
|
|
|
|
|
@ -93,15 +94,25 @@ namespace Ombi.Controllers
|
|
|
|
|
[HttpGet("about")]
|
|
|
|
|
public AboutViewModel About()
|
|
|
|
|
{
|
|
|
|
|
var dbConfiguration = DatabaseExtensions.GetDatabaseConfiguration();
|
|
|
|
|
var storage = StoragePathSingleton.Instance;
|
|
|
|
|
var model = new AboutViewModel
|
|
|
|
|
{
|
|
|
|
|
FrameworkDescription = RuntimeInformation.FrameworkDescription,
|
|
|
|
|
OsArchitecture = RuntimeInformation.OSArchitecture.ToString(),
|
|
|
|
|
OsDescription = RuntimeInformation.OSDescription,
|
|
|
|
|
ProcessArchitecture = RuntimeInformation.ProcessArchitecture.ToString(),
|
|
|
|
|
ApplicationBasePath =Directory.GetCurrentDirectory()
|
|
|
|
|
ApplicationBasePath = Directory.GetCurrentDirectory(),
|
|
|
|
|
ExternalConnectionString = dbConfiguration.ExternalDatabase.ConnectionString,
|
|
|
|
|
ExternalDatabaseType = dbConfiguration.ExternalDatabase.Type,
|
|
|
|
|
OmbiConnectionString = dbConfiguration.OmbiDatabase.ConnectionString,
|
|
|
|
|
OmbiDatabaseType = dbConfiguration.OmbiDatabase.Type,
|
|
|
|
|
SettingsConnectionString = dbConfiguration.SettingsDatabase.ConnectionString,
|
|
|
|
|
SettingsDatabaseType = dbConfiguration.SettingsDatabase.Type,
|
|
|
|
|
StoragePath = storage.StoragePath.HasValue() ? storage.StoragePath : "None Specified"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var version = AssemblyHelper.GetRuntimeVersion();
|
|
|
|
|
var productArray = version.Split('-');
|
|
|
|
|
model.Version = productArray[0];
|
|
|
|
@ -233,8 +244,8 @@ namespace Ombi.Controllers
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
public async Task<string> GetDefaultLanguage()
|
|
|
|
|
{
|
|
|
|
|
var s = await Get<OmbiSettings>();
|
|
|
|
|
return s.DefaultLanguageCode;
|
|
|
|
|
var s = await Get<OmbiSettings>();
|
|
|
|
|
return s.DefaultLanguageCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -431,7 +442,7 @@ namespace Ombi.Controllers
|
|
|
|
|
[HttpGet("Update")]
|
|
|
|
|
public async Task<UpdateSettings> UpdateSettings()
|
|
|
|
|
{
|
|
|
|
|
var settings = await Get<UpdateSettings>();
|
|
|
|
|
var settings = await Get<UpdateSettings>();
|
|
|
|
|
|
|
|
|
|
return Mapper.Map<UpdateSettingsViewModel>(settings);
|
|
|
|
|
}
|
|
|
|
@ -586,7 +597,7 @@ namespace Ombi.Controllers
|
|
|
|
|
Message = $"CRON Expression {body.Expression} is not valid"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.Success = true;
|
|
|
|
|
return model;
|
|
|
|
|
}
|
|
|
|
|