From 5d2a1da73e83f9379b608245c8a4e0eb3acc5c20 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Fri, 10 May 2024 07:34:08 -0600 Subject: [PATCH] Always set cast receivers during migration (#11516) --- .../Routines/AddDefaultCastReceivers.cs | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 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 /// 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" - } - }; + Id = "F007D354", + Name = "Stable" + }, + new() + { + Id = "6F511C87", + Name = "Unstable" + } + ]; - _serverConfigurationManager.SaveConfiguration(); - } + _serverConfigurationManager.SaveConfiguration(); } }