fix(settings): refine media server switch logic and update user instructions

This commit is contained in:
0xsysr3ll
2026-02-22 22:34:05 +01:00
parent c5754e35fa
commit 27fba8f6a1
3 changed files with 13 additions and 15 deletions

View File

@@ -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) {

View File

@@ -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:',

View File

@@ -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.",