fix(qbz-slint): Qobuz Connect controller-mode reflection + polish

From the controller-mode debug session. All peer-facing paths gate on
is_peer_renderer_active, so renderer / local / disconnected playback is
unaffected.

- Now-playing bar + queue follow the peer authoritatively: reflect the peer's
  current track / position / volume, refresh on the peer's track changes, and
  fetch a fresh renderer state on becoming a controller (so the bar isn't stale
  until the next track change; this also fixed remote pause, which had been
  sending a stale current_queue_item).
- Route play-next / add-to-queue (single track) to the peer via
  QueueInsertTracks / QueueAddTracks (insert-after the peer's current item);
  multi-track album/playlist enqueue stays local for now. Clear the superseded
  SetVolume pending to stop the volume-drag command spam.
- Clean disconnect: disarm the liveness watchdog + clear the device list / cast
  state, so no spurious "renderer unreachable" toast and no lingering badge.
- Volume lock only for local ALSA-Direct bit-perfect (backend Alsa + plugin Hw),
  lifted while controlling; reflect the peer's volume with a 50% safety clamp
  when unknown.
- Connect button golden whenever a session is on; +2px now-playing bar height.

cc
This commit is contained in:
vicrodh committed 2026-06-03 17:28:53 -06:00
1 parent 97c232b92a
commit 485be7d16c
5 files changed
+299 -3

No files matched your search

+4 -2
View File
@@ -143,7 +143,7 @@ export component PlayerBar inherits Rectangle {
// The local ALSA-Direct lock (bit-perfect) is LIFTED when controlling a peer
// (the `!is-remote` term) so the user CAN adjust the remote renderer; the
// peer half is the sink-pushed NowPlayingState.volume-locked.
property <bool> vol-locked: (SettingsState.alsa-plugin-is-hw && !NowPlayingState.is-remote)
property <bool> vol-locked: (SettingsState.backend-is-alsa && SettingsState.alsa-plugin-is-hw && !NowPlayingState.is-remote)
|| NowPlayingState.volume-locked;
VerticalLayout {
@@ -306,7 +306,9 @@ export component PlayerBar inherits Rectangle {
width: 28px;
height: 32px;
ConnectButton {
active: NowPlayingState.is-remote;
// Golden whenever a Qobuz Connect session is on — whether
// qbz is the renderer or controlling a peer (not just is-remote).
active: NowPlayingState.qconnect-connected;
tooltip: @tr("Qobuz Connect");
clicked => {
qconnect-menu.show();