mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(playback): cross-server browse, Lucky Mix, and Now Playing (#768)
* fix(playback): keep browsed server when queue plays elsewhere Lucky Mix on a non-playback server now clears the old queue and pins the active server before building. Now Playing metadata uses apiForServer against the queue server instead of forcing ensurePlaybackServerActive on every activeServerId change. * docs: note PR #768 in CHANGELOG and settings credits * fix(now-playing): gate AudioMuse similar artists on playback server Match getArtistInfoForServer credentials: when browsing another server while the queue plays elsewhere, similar-artist count follows the queue server's AudioMuse flag, not the browsed server.
This commit is contained in:
@@ -34,6 +34,16 @@ export function playbackServerDiffersFromActive(): boolean {
|
||||
return !!activeSid && queueServerId !== activeSid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop playback owned by another server so a new mix on the browsed server
|
||||
* can replace the queue (Lucky Mix / similar flows after ConnectionIndicator switch).
|
||||
*/
|
||||
export function prepareActiveServerForNewMix(): void {
|
||||
if (!playbackServerDiffersFromActive()) return;
|
||||
usePlayerStore.getState().clearQueue();
|
||||
bindQueueServerForPlayback();
|
||||
}
|
||||
|
||||
/** Switch the browsed server to the queue server when they differ (e.g. artist/album links). */
|
||||
export async function ensurePlaybackServerActive(): Promise<boolean> {
|
||||
if (!playbackServerDiffersFromActive()) return true;
|
||||
|
||||
Reference in New Issue
Block a user