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:
4 files changed
+12
-4
No files matched your search
@@ -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
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user