ソースを参照

Always set cast receivers during migration (#11516)

Cody Robibero 1 年間 前
コミット
5d2a1da73e
1 ファイル変更14 行追加18 行削除
  1. 14 18
      Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs

+ 14 - 18
Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs

@@ -32,24 +32,20 @@ public class AddDefaultCastReceivers : IMigrationRoutine
     /// <inheritdoc />
     public void Perform()
     {
-        // Only add if receiver list is empty.
-        if (_serverConfigurationManager.Configuration.CastReceiverApplications.Length == 0)
-        {
-            _serverConfigurationManager.Configuration.CastReceiverApplications = new CastReceiverApplication[]
+        _serverConfigurationManager.Configuration.CastReceiverApplications =
+        [
+            new()
             {
-                new()
-                {
-                    Id = "F007D354",
-                    Name = "Stable"
-                },
-                new()
-                {
-                    Id = "6F511C87",
-                    Name = "Unstable"
-                }
-            };
-
-            _serverConfigurationManager.SaveConfiguration();
-        }
+                Id = "F007D354",
+                Name = "Stable"
+            },
+            new()
+            {
+                Id = "6F511C87",
+                Name = "Unstable"
+            }
+        ];
+
+        _serverConfigurationManager.SaveConfiguration();
     }
 }