ErrorMessage.code was defined as int32 but server sends string codes
(e.g. 'ERROR_QUEUE_INSERT_TRACKS'). Changed to string type and added
logging for queue error responses.
Added context_uuid (random UUID v4) to queue insert and add commands -
the server likely requires this to associate tracks with a context.
Logs confirm the QConnect protocol uses milliseconds for current_position
and duration fields. The 'seconds' fix was incorrect - the position
display issue was already resolved by the spam fix in 807b775a.
QConnect protocol uses seconds for current_position and duration fields.
Frontend was sending milliseconds (currentTime * 1000), causing controllers
to show track position at the end instead of actual progress.
Two bugs caused "Current track not found in queue nor autoplay" errors:
1. prevTrackId only updated when allowLocalSessionPersistence was true,
but during QConnect mode this is always false. This made every 1s
playback tick fire a state report (trackId != null always != prevTrackId
which was stuck at null).
2. Frontend sent currentQueueItemId: null in all reports because it
doesn't know about QConnect queue_item_ids. Server rejected every
report.
Fixes:
- Update prevTrackId unconditionally (not gated by session persistence)
- Backend auto-fills queue_item_ids from renderer state when frontend
passes null
- Track next_queue_item_id in sync state alongside current
- Add throttled 5s periodic position report for controller progress
The gapless transition detection was intercepting QConnect track changes
before the "Track changed externally" handler could process them. Since
the gapless callback returned early (QConnect guard), the event was
silently swallowed and the UI never updated.
Added remoteControlMode flag to playerStore that disables:
- Gapless transition interception (the root cause)
- Fallback end-of-track detection
- Auto-advance on track end
This allows the "Track changed externally" handler to run and sync
the song card, seek bar, and volume with the QConnect-controlled track.
When QConnect is connected as renderer, the server/controller manages
track advancement. The frontend must not auto-advance, pre-queue gapless
tracks, or resume from stop on its own, as this fights the remote controller
and causes rapid queue scrolling without actual playback.
- Add session card showing active renderer and renderer list
- Add controller transport buttons (play/pause/stop) via v2_qconnect_set_player_state
- Add volume slider and mute toggle via v2_qconnect_set_volume/mute_volume
- Add renderer selector with set-active-renderer button
- Pass sessionSnapshot prop from +page.svelte to QconnectPanel
- Add i18n keys for all new controller UI elements (en + es)
When QBZ is acting as a QConnect renderer, local user interactions
(volume change, play/pause) are now reported back to the server via
v2_qconnect_report_volume and v2_qconnect_report_playback_state.
This keeps the controller in sync with QBZ's actual state.
Session management events (ADD_RENDERER, REMOVE_RENDERER,
ACTIVE_RENDERER_CHANGED, SESSION_STATE) were only being logged.
Now they are stored in QconnectSessionState with renderer list,
active renderer ID, and session UUID. Exposed via new
v2_qconnect_session_snapshot command for frontend use.
Instead of defaulting start_index to 0 when renderer position is
unknown, preserve the current CoreBridge cursor position. This prevents
the queue from resetting to track 0 on every incremental queue update.
track_ids in QueueLoadTracks, QueueInsertTracks, QueueAddTracks, and
AutoplayLoadTracks was int32 packed=false but the server expects
fixed32 (packed by default). This silently broke all outbound queue
manipulation commands.
Server sends track_id as fixed32 (wire type 5) and shuffle_seed as
fixed32, but our structs declared them as int32 (wire type 0/varint),
causing decode failures on QueueState, TracksLoaded, and
RendererSetState messages.
Root cause: inner_payload from CloudPayload.payload IS a QConnectBatch
(QConnectMessages) with repeated QConnectMessage entries in field 3.
The QCloudInnerEnvelope struct incorrectly treated field 3 as opaque
bytes, keeping only the last repeated entry and losing all messages.
Additionally, QConnectMessages.messages_time was declared as uint64
(wire type 0/varint) but the server sends fixed64 (wire type 1),
causing a wire type mismatch that would fail decoding.
Changes:
- Remove QCloudInnerEnvelope struct entirely
- Pass inner_payload directly to decode_queue_server_events/decode_renderer_server_commands
- Fix messages_time from uint64 to fixed64 to match server wire format
Verified against qonductor proto definitions (QConnectBatch) used in
working POC v1 and v2 implementations.
Root cause: server wraps QConnectMessage inside an inner envelope with
fields 1 (correlation_id), 2 (sequence), 3 (actual message bytes).
We were passing the envelope directly to QConnectMessage::decode(),
which silently skipped the unknown wrapper fields and found nothing.
Also restructure bootstrap: controller join first (works without
session_uuid), renderer join deferred until SESSION_STATE (type 81)
arrives with the session_uuid the server requires.
Log every transport event at info level to diagnose silent
connection death. Previous logging only covered decoded queue/renderer
events, missing Connected/Disconnected/Auth/Subscribe/Keepalive/
Outbound/Frame events entirely.
Add missing SRVR_CTRL session management message types (81-87, 97-101)
that were completely absent from the protobuf definitions. Without these,
prost silently discarded all session topology messages from the server.
- Add 12 new proto structs for session/renderer/volume/quality events
- Add decoder branches and map functions for all new message types
- Add SessionManagementEvent variant to bypass queue reducer
- Add v2_qconnect_report_playback_state and v2_qconnect_report_volume
- Add comprehensive logging for inbound message diagnostics
- Add DeviceCapabilitiesMessage to protobuf (tag 7 on DeviceInfo) with
volume_remote_control=ALLOWED, min/max audio quality
- Extend JoinSessionMessage with reason, initial_state, is_active fields
matching Android renderer proto (tags 3-5)
- Bootstrap sends renderer JoinSession with is_active=true and initial
RendererState (STOPPED) so other devices see QBZ immediately
- Send initial StateUpdated, VolumeChanged, MaxAudioQualityChanged
reports after join for full renderer presence
- Default subscribe channels to 0x01,0x02,0x03 instead of empty
- Request queue state from server after bootstrap
cc
On first play after app start, the audio thread held stale settings from
Player::new() — if the user had configured PipeWire/ALSA backend, the
thread might not use the correct backend/device, defaulting to 48kHz.
Now v2_play_track reloads settings from the DB before every play_data()
call, matching what v2_reinit_audio_device already does. This is why
re-selecting the device fixed the issue: it called reload_settings first.
Also extracts convert_to_qbz_audio_settings() helper to deduplicate the
settings conversion between v2_play_track and v2_reinit_audio_device.
Fixes#69
Thread onCreateQbzRadio/onCreateQobuzRadio through TrackRow,
VirtualizedTrackList, PlaylistDetailView, and FavoritesView so
track context menus in playlists and favorites show the radio
submenu with QBZ Radio and Qobuz Radio options.
FavQ shuffles up to 50 tracks from the user's Qobuz favorites.
TopQ seeds the Qobuz suggest API from the user's most-played playlists.
Both have same-day cache, refresh button, red/blue gradient artwork,
and a "qbz" badge (vs "qobuz" on DailyQ/WeeklyQ).
Add context menu support (right-click) to the inline track rows in
ArtistDetailView and LabelView popular tracks sections. Right-clicking
a track opens the TrackMenu at the cursor position with all available
actions. Also wires up TrackRow component with contextMenuPosition
prop for the same functionality in reusable track rows.
Add /radio/artist and /radio/track Qobuz API endpoints alongside the
existing /radio/album. TrackMenu now shows a radio submenu with QBZ
Radio (RadioPoolBuilder) and Qobuz Radio options when both are
available. Artist header radio button opens a dropdown to choose
between the two engines.
Backend: get_radio_artist(), get_radio_track() in client.rs,
v2_create_qobuz_artist_radio and v2_create_qobuz_track_radio commands.
Frontend: TrackMenu radio submenu with mutual exclusion against
share/download submenus, ArtistDetailView dropdown, LabelView support.
i18n keys added to all four locale files.
The /radio/album endpoint returns partial track objects without the
performer field, causing all tracks to show as "Unknown Artist".
Extract track IDs from the response and fetch each via get_track()
to get complete data, matching the pattern used by artist/track radio.
Add Radio button to album detail header (next to favorite button)
that calls v2_create_album_radio, populates the queue with Qobuz
API recommended tracks, and starts playback of the first track.
Add i18n keys for album radio in all 4 locale files (en/es/de/fr).
Add /radio/album Qobuz API endpoint support:
- RadioResponse struct in models.rs with lenient deserialization
- get_radio_album() client method
- v2_create_album_radio command that calls the API directly (no
RadioPoolBuilder/RadioDb), filters blacklisted artists, populates
queue, and sets Radio playback context
- Register command in lib.rs invoke handler
Two fixes for session not persisting:
1. Changed v2_get_all_queue_tracks to return a struct instead of a
tuple — Tauri IPC serialization of tuples is unreliable.
2. Added proactive session saves instead of relying on async
beforeunload (which races with window close):
- Debounced full save on track change (2s after new track starts)
- Debounced full save on pause
- Reduced periodic save from 60s to 15s during playback
- Close handler remains as best-effort backup