feat(queue): play queue sync — manual pull, idle auto-sync, multi-server push (#1131)

This commit is contained in:
cucadmuh
2026-06-19 18:19:11 +03:00
committed by GitHub
parent c428d37e0e
commit 955a9fcbd6
23 changed files with 722 additions and 140 deletions
+8
View File
@@ -18,6 +18,7 @@ import {
} from '../server/serverIndexKey';
import {
activeServerProfileId,
filterQueueRefsForServerProfile,
isMultiServerQueue,
profileIdFromQueueRef,
queueItemRefAt,
@@ -174,6 +175,13 @@ export function queueIsMultiServer(): boolean {
return isMultiServerQueue(usePlayerStore.getState().queueItems);
}
/** Refs owned by the server that is currently playing (mixed-queue safe). */
export function filterQueueRefsForPlaybackServer(refs: QueueItemRef[]): QueueItemRef[] {
const playbackSid = getPlaybackServerId();
if (!playbackSid) return [];
return filterQueueRefsForServerProfile(refs, playbackSid);
}
/**
* True when the current queue belongs to another server (or is unpinned legacy
* state) and a browsed-server mix should clear it before enqueueing new tracks.