From 27fba8f6a1b47c24ee8136c45feda49f91eaf1ea Mon Sep 17 00:00:00 2001 From: 0xsysr3ll <0xsysr3ll@pm.me> Date: Sun, 22 Feb 2026 22:34:05 +0100 Subject: [PATCH] fix(settings): refine media server switch logic and update user instructions --- server/routes/settings/index.ts | 10 ++++------ src/components/Settings/SwitchMediaServerSection.tsx | 10 +++++----- src/i18n/locale/en.json | 8 ++++---- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/server/routes/settings/index.ts b/server/routes/settings/index.ts index ac686b3e6..5e9cefd5d 100644 --- a/server/routes/settings/index.ts +++ b/server/routes/settings/index.ts @@ -601,7 +601,9 @@ settingsRoutes.post( } settings.main.mediaServerType = newType; - settings.jellyfin = { ...EMPTY_JELLYFIN_SETTINGS }; + if (target === 'plex') { + settings.jellyfin = { ...EMPTY_JELLYFIN_SETTINGS }; + } await getRepository(User) .createQueryBuilder() .update(User) @@ -633,12 +635,8 @@ settingsRoutes.post( .execute(); startJobs(); - const reconfigure = - target === 'jellyfin' || target === 'emby' - ? ' Restart the server, then reconfigure and sign in with the new media server.' - : ' Restart the server, then sign in with the new media server.'; return res.status(200).json({ - message: `Switched to ${serverName}. All users have been logged out.${reconfigure}`, + message: `Switched to ${serverName}. All users have been logged out. Restart the server, then sign in with the new media server.`, }); } } catch (e) { diff --git a/src/components/Settings/SwitchMediaServerSection.tsx b/src/components/Settings/SwitchMediaServerSection.tsx index d0652635e..472a654c5 100644 --- a/src/components/Settings/SwitchMediaServerSection.tsx +++ b/src/components/Settings/SwitchMediaServerSection.tsx @@ -43,12 +43,12 @@ const messages = defineMessages('components.Settings', { switchMediaServerStep3JellyfinEmby: '3) Optionally check {users}.', switchMediaServerStep4JellyfinEmby: '4) Choose the target below and switch.', switchMediaServerStep1JellyfinEmbyToOther: - '1) Choose the target below and switch.', - switchMediaServerStep2JellyfinEmbyToOther: '2) Restart the server.', - switchMediaServerStep3JellyfinEmbyToOther: - '3) Reconfigure the connection in the Jellyfin settings tab (same tab, new server type).', + '1) In the Jellyfin settings tab, reconfigure the connection for your new server (host, API key, etc.) and save.', + switchMediaServerStep2JellyfinEmbyToOther: + '2) Choose the target below and switch.', + switchMediaServerStep3JellyfinEmbyToOther: '3) Restart the server.', switchMediaServerStep4JellyfinEmbyToOther: - '4) Have users sign in with the new media server.', + '4) Sign in with the new media server.', switchMediaServerWarning: 'Everyone will be logged out. You must restart the server after switching.', switchTargetAfter: 'New media server:', diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 1016498b6..58e275f54 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -1287,16 +1287,16 @@ "components.Settings.switchMediaServerButton": "Switch media server", "components.Settings.switchMediaServerError": "Something went wrong while switching media server. Please try again.", "components.Settings.switchMediaServerStep1JellyfinEmby": "1) Configure Plex in the Plex settings tab.", - "components.Settings.switchMediaServerStep1JellyfinEmbyToOther": "1) Choose the target below and switch.", + "components.Settings.switchMediaServerStep1JellyfinEmbyToOther": "1) In the Jellyfin settings tab, reconfigure the connection for your new server (host, API key, etc.) and save.", "components.Settings.switchMediaServerStep1Plex": "1) Configure Jellyfin or Emby in the Jellyfin settings tab.", "components.Settings.switchMediaServerStep2JellyfinEmby": "2) Have users link Plex in {profile} => {linkedAccounts}.", - "components.Settings.switchMediaServerStep2JellyfinEmbyToOther": "2) Restart the server.", + "components.Settings.switchMediaServerStep2JellyfinEmbyToOther": "2) Choose the target below and switch.", "components.Settings.switchMediaServerStep2Plex": "2) Have users link Jellyfin or Emby in {profile} => {linkedAccounts}.", "components.Settings.switchMediaServerStep3JellyfinEmby": "3) Optionally check {users}.", - "components.Settings.switchMediaServerStep3JellyfinEmbyToOther": "3) Reconfigure the connection in the Jellyfin settings tab (same tab, new server type).", + "components.Settings.switchMediaServerStep3JellyfinEmbyToOther": "3) Restart the server.", "components.Settings.switchMediaServerStep3Plex": "3) Optionally check {users} to see who has linked.", "components.Settings.switchMediaServerStep4JellyfinEmby": "4) Choose the target below and switch.", - "components.Settings.switchMediaServerStep4JellyfinEmbyToOther": "4) Have users sign in with the new media server.", + "components.Settings.switchMediaServerStep4JellyfinEmbyToOther": "4) Sign in with the new media server.", "components.Settings.switchMediaServerStep4Plex": "4) Choose the target below and switch.", "components.Settings.switchMediaServerSuccess": "Media server switched. All users logged out. Restart the server, then sign in again.", "components.Settings.switchMediaServerWarning": "Everyone will be logged out. You must restart the server after switching.",