Qobuz Connect: two cases where the renderer screen stays empty - #794
Open
Gjuju wants to merge 2 commits into
Open
Qobuz Connect: two cases where the renderer screen stays empty#794Gjuju wants to merge 2 commits into
Gjuju wants to merge 2 commits into
Conversation
TrackStarted is the only writer of qbzmeta.json, and the file is truncated when a session ends. The Qobuz app hands a session over PAUSED, though: the daemon loads the track and waits for a play command, so no TrackStarted is emitted and the renderer screen sits empty until playback is started -- the event log just repeats "Cover URL: empty / Update cache: skipped". The daemon knows the track the whole time. When the cache is empty, read .current_track from /api/queue (title, artist, album, duration, artwork, bit depth and sample rate, which rebuild the same SFORMAT string TrackStarted produces) instead of giving up. A daemon that answers nothing -- empty queue, unreachable, malformed reply -- leaves the vars untouched and the skip happens exactly as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Connect branch raises the renderer overlay and tells the front end qbzactive1, but never says what is on it. The metadata cache is pushed by TrackStarted and by a play/pause change only, so a session that reconnects mid-track shows an empty renderer screen until the next track starts. Observed on x86_64: reconnect at 16:25:13 with the cache holding the track that was playing; the screen stayed blank for two minutes and only filled in when the next TrackStarted fired. Re-send the cache, guarded on it being non-empty so a reconnect with nothing cached behaves exactly as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The renderer screen can come up with nothing on it, for two unrelated reasons.
Both leave
qbzactive=1, so the overlay is there, showing nothing.1. The session is handed over paused
TrackStartedis the only writer ofqbzmeta.json, and the file is truncatedwhen a session ends. The Qobuz app hands a session over paused, though: the
daemon loads the track and waits for a play command, so no
TrackStartedisemitted and the event log just repeats:
Measured:
qbzactive=1,qbzmeta.json0 bytes, while the daemon knew thetrack, the artist and a position all along.
When the cache is empty, read
.current_trackfrom/api/queue(title,artist, album, duration, artwork, bit depth and sample rate, which rebuild the
same
SFORMATstringTrackStartedproduces) instead of giving up.2. A session reconnects mid-track
The Connect branch raises the overlay and tells the front end
qbzactive1, butnever says what is on it -- the cache is pushed by
TrackStartedand by aplay/pause change only. Reconnecting during a track therefore shows an empty
screen until the next track starts.
Observed: reconnect at 16:25:13 with the cache holding the track that was
playing; the screen stayed blank for two minutes, and filled in only when the
next
TrackStartedfired.Re-send the cache on connect.
Validation
Both on x86_64 and on a Raspberry Pi running stock 10.3.4:
(
- Daemon metadata: <title> / <artist>in the event log);Four degenerate answers from the daemon were checked for the first case -- empty
queue, unreachable, malformed reply, no artwork -- and each leaves the variables
untouched, so the skip happens exactly as before. The second is guarded on the
cache being non-empty.
Reversibility
40 lines, no deletions. Reverting restores both previous behaviours.