chore(orbit): configurable shuffle interval

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-24 14:13:32 +02:00
parent 5326011268
commit 089774dc3e
8 changed files with 126 additions and 14 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import {
sweepGuestOutboxes,
applyOutboxSnapshotsToState,
maybeShuffleQueue,
ORBIT_SHUFFLE_INTERVAL_MS,
effectiveShuffleIntervalMs,
} from '../utils/orbit';
import {
orbitOutboxPlaylistName,
@@ -117,7 +117,7 @@ export function useOrbitHost(): void {
// mix the guests hear actually changes. `autoShuffle=false` skips
// both.
const shouldShuffleNow = afterSweep.settings?.autoShuffle !== false
&& (Date.now() - afterSweep.lastShuffle >= ORBIT_SHUFFLE_INTERVAL_MS);
&& (Date.now() - afterSweep.lastShuffle >= effectiveShuffleIntervalMs(afterSweep));
const afterShuffle = maybeShuffleQueue(afterSweep);
if (shouldShuffleNow) {
const before = usePlayerStore.getState().queue.length;