fix: add FavQ and TopQ context types to playback context

The ContextType enum and v2_set_playback_context match were missing
fav_q and top_q variants, causing an "Invalid context type" error that
blocked all playback from FavQ and TopQ views. Also wrap
setPlaybackContext calls in try/catch so context errors don't prevent
track playback.

Fixes #140
This commit is contained in:
vicrodh committed 2026-03-01 08:58:45 -06:00
1 parent ad866b191e
commit 2095e5fce3
4 files changed
+30 -16

No files matched your search

+12 -8
View File
@@ -290,14 +290,18 @@
if (queueIndex < 0) return;
await setPlaybackContext(
'fav_q',
'favq',
'FavQ',
'qobuz',
queueTrackIds,
queueIndex
);
try {
await setPlaybackContext(
'fav_q',
'favq',
'FavQ',
'qobuz',
queueTrackIds,
queueIndex
);
} catch (err) {
console.error('Failed to set playback context:', err);
}
try {
await invoke('v2_set_queue', { tracks: queueTracks, startIndex: queueIndex });
+12 -8
View File
@@ -403,14 +403,18 @@
if (queueIndex < 0) return;
await setPlaybackContext(
'top_q',
'topq',
'TopQ',
'qobuz',
queueTrackIds,
queueIndex
);
try {
await setPlaybackContext(
'top_q',
'topq',
'TopQ',
'qobuz',
queueTrackIds,
queueIndex
);
} catch (err) {
console.error('Failed to set playback context:', err);
}
try {
await invoke('v2_set_queue', { tracks: queueTracks, startIndex: queueIndex });