fix(qconnect): fix queue error decode and add context_uuid to queue commands

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.
This commit is contained in:
vicrodh committed 2026-02-22 02:45:04 -06:00
1 parent 92b82a62dd
commit 65f0f25203
4 files changed
+12 -4

No files matched your search

+2
View File
@@ -270,6 +270,7 @@ export async function queueTrackNext(
const insertAfter = await getQconnectInsertAfterQueueItemId();
const payload: Record<string, unknown> = {
track_ids: [queueTrack.id],
context_uuid: crypto.randomUUID(),
autoplay_reset: false,
autoplay_loading: false
};
@@ -337,6 +338,7 @@ export async function queueTrackLater(
try {
await sendQconnectQueueCommandWithAdmission('queue_add_tracks', origin, {
track_ids: [queueTrack.id],
context_uuid: crypto.randomUUID(),
autoplay_reset: false,
autoplay_loading: false
});