From 76d1ddd0077a957a58c247ea6bf46eaccc04462f Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:22:00 -0600 Subject: [PATCH] fix: Start playback automatically when creating radio - Import playQueueIndex from queueStore - Call playQueueIndex(0) after radio creation to start playing - Applies to both artist radio and track radio --- src/lib/components/views/ArtistDetailView.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/components/views/ArtistDetailView.svelte b/src/lib/components/views/ArtistDetailView.svelte index 2130e014b..e88717bed 100644 --- a/src/lib/components/views/ArtistDetailView.svelte +++ b/src/lib/components/views/ArtistDetailView.svelte @@ -6,6 +6,7 @@ import TrackMenu from '../TrackMenu.svelte'; import { consumeContextTrackFocus, setPlaybackContext } from '$lib/stores/playbackContextStore'; import { togglePlay } from '$lib/stores/playerStore'; + import { playQueueIndex } from '$lib/stores/queueStore'; import { tick } from 'svelte'; interface Track { @@ -258,7 +259,9 @@ artistName: artist.name }); console.log(`[Radio] Artist radio created: ${sessionId}`); - // Queue and context are set by the backend command + + // Start playing the first track from the radio queue + await playQueueIndex(0); } catch (err) { console.error('Failed to create artist radio:', err); // TODO: Show user-facing error toast if available @@ -278,7 +281,9 @@ artistId: trackArtistId }); console.log(`[Radio] Track radio created: ${sessionId}`); - // Queue and context are set by the backend command + + // Start playing the first track from the radio queue + await playQueueIndex(0); } catch (err) { console.error('Failed to create track radio:', err); // TODO: Show user-facing error toast if available