The Free Software Media System - Server Backend & API
Extract "migrations" config name to a proper constant
Vasilyccafebca68fc
diff --git a/Jellyfin.Server/Migrations/MigrationRunner.cs b/Jellyfin.Server/Migrations/MigrationRunner.csindex 04d0378521..1db99f5961 100644--- a/Jellyfin.Server/Migrations/MigrationRunner.cs+++ b/Jellyfin.Server/Migrations/MigrationRunner.cs@@ -27,7 +27,7 @@ namespace Jellyfin.Server.Migrationspublic static void Run(CoreAppHost host, ILoggerFactory loggerFactory){var logger = loggerFactory.CreateLogger<MigrationRunner>();- var migrationOptions = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<MigrationOptions>("migrations");+ var migrationOptions = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<MigrationOptions>(MigrationsListStore.StoreKey);var applied = migrationOptions.Applied.ToList();for (var i = 0; i < Migrations.Length; i++)@@ -56,7 +56,7 @@ namespace Jellyfin.Server.Migrations{logger.LogInformation("Some migrations were run, saving the state");migrationOptions.Applied = applied.ToArray();- host.ServerConfigurationManager.SaveConfiguration("migrations", migrationOptions);+ host.ServerConfigurationManager.SaveConfiguration(MigrationsListStore.StoreKey, migrationOptions);}}}diff --git a/Jellyfin.Server/Migrations/MigrationsListStore.cs b/Jellyfin.Server/Migrations/MigrationsListStore.csindex d91d602c14..7a1ca66714 100644--- a/Jellyfin.Server/Migrations/MigrationsListStore.cs+++ b/Jellyfin.Server/Migrations/MigrationsListStore.cs@@ -7,13 +7,18 @@ namespace Jellyfin.Server.Migrations/// </summary>public class MigrationsListStore : ConfigurationStore{+ /// <summary>+ /// The name of the configuration in the storage.+ /// </summary>+ public static readonly string StoreKey = "migrations";+/// <summary>/// Initializes a new instance of the <see cref="MigrationsListStore"/> class./// </summary>public MigrationsListStore(){ConfigurationType = typeof(MigrationOptions);- Key = "migrations";+ Key = StoreKey;}}}