aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs
diff options
context:
space:
mode:
authorNiels van Velzen <git@ndat.nl>2025-11-20 22:11:55 +0100
committerNiels van Velzen <git@ndat.nl>2025-11-20 22:11:55 +0100
commit67c67df5077af5c90242fc5fc36373b2ae6f2c91 (patch)
tree0aef78a1d529fe5c8d42b31680e7f77fd676e1e9 /Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs
parent196c243a7d53d06a5fe492942442d48bba9727c4 (diff)
Use async migration
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs')
-rw-r--r--Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs b/Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs
index 8bfb0c4e8..6edfcbcfd 100644
--- a/Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs
+++ b/Jellyfin.Server/Migrations/Routines/DisableLegacyAuthorization.cs
@@ -1,3 +1,5 @@
+using System.Threading;
+using System.Threading.Tasks;
using MediaBrowser.Controller.Configuration;
namespace Jellyfin.Server.Migrations.Routines;
@@ -5,10 +7,8 @@ namespace Jellyfin.Server.Migrations.Routines;
/// <summary>
/// Migration to disable legacy authorization in the system config.
/// </summary>
-#pragma warning disable CS0618 // Type or member is obsolete
-[JellyfinMigration("2025-11-18T16:00:00", nameof(DisableLegacyAuthorization), "F020F843-E079-4061-99E0-F43D145F2557")]
-public class DisableLegacyAuthorization : IMigrationRoutine
-#pragma warning restore CS0618 // Type or member is obsolete
+[JellyfinMigration("2025-11-18T16:00:00", nameof(DisableLegacyAuthorization))]
+public class DisableLegacyAuthorization : IAsyncMigrationRoutine
{
private readonly IServerConfigurationManager _serverConfigurationManager;
@@ -22,9 +22,11 @@ public class DisableLegacyAuthorization : IMigrationRoutine
}
/// <inheritdoc />
- public void Perform()
+ public Task PerformAsync(CancellationToken cancellationToken)
{
_serverConfigurationManager.Configuration.EnableLegacyAuthorization = false;
_serverConfigurationManager.SaveConfiguration();
+
+ return Task.CompletedTask;
}
}