fix(qbzd): skip QConnect handoff when controlling daemon via HTTP
When playbackTarget is 'qbzd', the play-track command goes directly to the daemon HTTP API. Previously, it also went through handoffPlayTrackToRemoteRenderer (QConnect) which sent play to ALL connected renderers, causing audio on both local desktop AND remote daemon simultaneously. Now: qbzd mode = HTTP API only. QConnect handoff only runs in local mode. Local player stopped explicitly via invoke before sending to daemon. cc
This commit is contained in:
1 file changed
+14
-1
@@ -182,8 +182,21 @@ export async function playTrack(
|
||||
|
||||
try {
|
||||
let handledRemotely = false;
|
||||
const target = getTarget();
|
||||
|
||||
if (!gaplessTransition && !isLocal && source !== 'plex') {
|
||||
// When controlling a qbzd daemon, skip QConnect handoff entirely.
|
||||
// The HTTP API sends directly to the target daemon.
|
||||
if (target.type === 'qbzd') {
|
||||
// Stop local playback engine (if any)
|
||||
try { await invoke('v2_stop_playback'); } catch { /* ignore */ }
|
||||
|
||||
await remotePost('/api/playback/play-track', {
|
||||
track_id: track.id,
|
||||
quality: effectiveQuality(track),
|
||||
});
|
||||
setIsPlaying(true);
|
||||
handledRemotely = true;
|
||||
} else if (!gaplessTransition && !isLocal && source !== 'plex') {
|
||||
handledRemotely = await handoffPlayTrackToRemoteRenderer(track.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user