mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed #277
This commit is contained in:
parent
a1ae37eae4
commit
34e74c74c1
6 changed files with 169 additions and 56 deletions
|
@ -53,7 +53,7 @@ namespace PlexRequests.Core
|
|||
{
|
||||
CreateDefaultSettingsPage(urlBase);
|
||||
}
|
||||
|
||||
|
||||
var version = CheckSchema();
|
||||
if (version > 0)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ namespace PlexRequests.Core
|
|||
{
|
||||
var productVersion = AssemblyHelper.GetProductVersion();
|
||||
var trimStatus = new Regex("[^0-9]", RegexOptions.Compiled).Replace(productVersion, string.Empty).PadRight(4, '0');
|
||||
var version = int.Parse(trimStatus);
|
||||
var version = int.Parse(trimStatus);
|
||||
|
||||
var connection = Db.DbConnection();
|
||||
var schema = connection.GetSchemaVersion();
|
||||
|
@ -181,6 +181,7 @@ namespace PlexRequests.Core
|
|||
/// <summary>
|
||||
/// Migrates to version 1.8.
|
||||
/// <para>This includes updating the admin account to have all roles.</para>
|
||||
/// <para>Set the log level to info</para>
|
||||
/// </summary>
|
||||
private void MigrateToVersion1800()
|
||||
{
|
||||
|
@ -203,6 +204,23 @@ namespace PlexRequests.Core
|
|||
throw;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var settingsService = new SettingsServiceV2<LogSettings>(new SettingsJsonRepository(Db, new MemoryCacheProvider()));
|
||||
var logSettings = settingsService.GetSettings();
|
||||
logSettings.Level = LogLevel.Info.Ordinal;
|
||||
settingsService.SaveSettings(logSettings);
|
||||
|
||||
LoggingHelper.ReconfigureLogLevel(LogLevel.FromOrdinal(logSettings.Level));
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue