aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-05-10 07:34:08 -0600
committerGitHub <noreply@github.com>2024-05-10 07:34:08 -0600
commit5d2a1da73e83f9379b608245c8a4e0eb3acc5c20 (patch)
treeb307469bbdc9be0074c50b5a102fcb5ee5f70e75
parent44b03a33151fb37275a01ec29de1c485d015c6ce (diff)
Always set cast receivers during migration (#11516)
-rw-r--r--Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs32
1 files changed, 14 insertions, 18 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs b/Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs
index 75a6a6176..57a5c8a62 100644
--- a/Jellyfin.Server/Migrations/Routines/AddDefaultCastReceivers.cs
+++ b/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();
}
}