From 5d74dad63fdbf013ea57d814749fd789c1f4b16f Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 19 Jan 2026 04:12:47 -0600 Subject: [PATCH 1/2] Fix track not showing as active after session restore The current track is now marked as active even when paused, matching standard player behavior. This fixes the issue where after app restoration, the loaded track doesn't appear active until user interaction. Changed: Remove isPlaybackActive condition from track active state logic in AlbumDetailView and PlaylistDetailView. --- src/lib/components/views/AlbumDetailView.svelte | 2 +- src/lib/components/views/PlaylistDetailView.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/views/AlbumDetailView.svelte b/src/lib/components/views/AlbumDetailView.svelte index 978f46eac..5cd022610 100644 --- a/src/lib/components/views/AlbumDetailView.svelte +++ b/src/lib/components/views/AlbumDetailView.svelte @@ -233,7 +233,7 @@ artist={track.artist} duration={track.duration} quality={track.quality} - isPlaying={isPlaybackActive && activeTrackId === track.id} + isPlaying={activeTrackId === track.id} downloadStatus={downloadInfo.status} downloadProgress={downloadInfo.progress} onPlay={() => { diff --git a/src/lib/components/views/PlaylistDetailView.svelte b/src/lib/components/views/PlaylistDetailView.svelte index 9e7cfed2a..0fbf97c3d 100644 --- a/src/lib/components/views/PlaylistDetailView.svelte +++ b/src/lib/components/views/PlaylistDetailView.svelte @@ -924,7 +924,7 @@ {#each displayTracks as track, idx (`${track.id}-${downloadStateVersion}`)} {@const downloadInfo = track.isLocal ? { status: 'none' as const, progress: 0 } : (getTrackDownloadStatus?.(track.id) ?? { status: 'none' as const, progress: 0 })} - {@const isActiveTrack = isPlaybackActive && ( + {@const isActiveTrack = ( track.isLocal ? (track.localTrackId !== undefined && activeTrackId === track.localTrackId) : activeTrackId === track.id From b786fe06e3b7dfa601d8d0cd7d0715e3837a695d Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 19 Jan 2026 04:14:34 -0600 Subject: [PATCH 2/2] Update badge status immediately when playback starts Add effect that reloads audio settings and status when playback begins, ensuring DAC/EXC badges show correct state without requiring hover interaction. --- src/lib/components/AudioOutputBadges.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/components/AudioOutputBadges.svelte b/src/lib/components/AudioOutputBadges.svelte index c6579768f..d3600b400 100644 --- a/src/lib/components/AudioOutputBadges.svelte +++ b/src/lib/components/AudioOutputBadges.svelte @@ -140,6 +140,13 @@ } } + // Reload status when playback starts + $effect(() => { + if (outputStatus?.is_playing) { + loadStatus(); + } + }); + onMount(() => { loadStatus();