feat(settings): keep current active server when adding a new one (#475)

* feat(settings): keep current active server when adding a new one

Adding a server from Settings no longer auto-switches the active server.
The new entry appears in the server list and is immediately usable, but
playback context, queue, and library view stay on the server the user
was already on.

The previous setLoggedIn(true) call was redundant — Settings is behind
RequireAuth, so isLoggedIn is necessarily already true at this point.

Login flow is unchanged: signing in on /login still selects that server,
which is the explicit intent of that screen.

* docs: changelog + contributors for PR #475

Adds the v1.46.0 "Changed" entry and the Psychotoxical contributors
line for the no-auto-switch-on-add-server behaviour.
This commit is contained in:
Frank Stellmacher
2026-05-06 11:43:22 +02:00
committed by GitHub
parent 7f03a9536a
commit 5c8cfb8be3
2 changed files with 8 additions and 2 deletions
+7
View File
@@ -83,6 +83,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* **`downscaleCoverBlob`** respects **AbortSignal** through **`canvas.toBlob`**.
* **`CachedImage`:** **`fetchQueueBias`** gives **artist** search thumbs **higher network-slot priority** than **album** thumbs when the pool is saturated; **`observeRootMargin`** defaults **wider** so **priority** updates **earlier** ahead of the scroll viewport.
### Settings — adding a server no longer switches to it
**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#475](https://github.com/Psychotoxical/psysonic/pull/475)**
* When you add a new server from **Settings → Servers**, the new entry now appears in the server picker but **your current active server stays active** — playback, queue and library view are no longer interrupted.
* The login screen on `/login` is unchanged: signing in there still selects the chosen server.
## Fixed
### Hot cache, HTTP streaming replay, and queue source indicator
+1 -2
View File
@@ -362,6 +362,7 @@ const CONTRIBUTORS = [
'Random Mix: playlist-size picker (50/75/100/125/150) and filter-panel layout cleanup (PR #445)',
'Queue: optional "Preserve Play Next order" toggle — multiple Play Next inserts queue up behind each other instead of latest-on-top (PR #464)',
'Library: "favorites only" filter on Albums, Artists and Advanced Search — toolbar toggle reading star overrides live (PR #466)',
'Settings: keep current active server when adding a new one — no more auto-switch interrupting playback or library context (PR #475)',
],
},
] as const;
@@ -2067,8 +2068,6 @@ export default function Settings() {
};
auth.setSubsonicServerIdentity(id, identity);
scheduleInstantMixProbeForServer(id, data.url, data.username, data.password, identity);
auth.setActiveServer(id);
auth.setLoggedIn(true);
setConnStatus(s => ({ ...s, [id]: 'ok' }));
} else {
setConnStatus(s => ({ ...s, [tempId]: 'error' }));