fix: Sync playback context after creating radio

Call getPlaybackContext() to sync radio context from backend to frontend
This ensures the Radio icon appears in NowPlayingBar
This commit is contained in:
vicrodh committed 2026-01-20 20:47:44 -06:00
1 parent 4fc8c04bc1
commit 95647e288f
1 file changed
+7 -1
@@ -4,7 +4,7 @@
import type { ArtistDetail, QobuzArtist } from '$lib/types';
import AlbumCard from '../AlbumCard.svelte';
import TrackMenu from '../TrackMenu.svelte';
import { consumeContextTrackFocus, setPlaybackContext } from '$lib/stores/playbackContextStore';
import { consumeContextTrackFocus, setPlaybackContext, getPlaybackContext } from '$lib/stores/playbackContextStore';
import { togglePlay } from '$lib/stores/playerStore';
import { getQueue, syncQueueState, playQueueIndex } from '$lib/stores/queueStore';
import { tick } from 'svelte';
@@ -271,6 +271,9 @@
radioLoadingMessage = 'Radio function is still experimental...';
await new Promise(resolve => setTimeout(resolve, 400));
// Sync context from backend
await getPlaybackContext();
// Play first track from queue
const firstTrack = await playQueueIndex(0);
@@ -318,6 +321,9 @@
});
console.log(`[Radio] Track radio created: ${sessionId}`);
// Sync context from backend
await getPlaybackContext();
// Play first track from queue
const firstTrack = await playQueueIndex(0);