From 3c95740ebec300952a59ccd4f89ee123a70e6293 Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Sun, 19 Apr 2026 19:28:30 +0000 Subject: [PATCH] feat(subsonic): emit coverArt id unconditionally (#296) getCoverArt now falls back to sidecar images next to the first track in an album, so browse responses can advertise a coverArt id whether or not albums.cover_art_path is set. Worst case the client gets a Subsonic 70 when no sidecar exists. --- internal/subsonic/types.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/subsonic/types.go b/internal/subsonic/types.go index 56dbf63c..df0d1c18 100644 --- a/internal/subsonic/types.go +++ b/internal/subsonic/types.go @@ -288,12 +288,11 @@ func songRef(t dbq.Track, albumTitle, artistName string) SongRef { return s } -// coverArtID uses the album ID as the cover-art key since Minstrel's getCoverArt -// will resolve from albums.cover_art_path. Returns "" when no cover art exists. +// coverArtID returns the album UUID as the cover-art key. getCoverArt uses +// the album row to find art either in cover_art_path (when the scanner sets +// it) or via sidecar lookup in the album directory, so emitting the id +// unconditionally is safe — worst case getCoverArt returns a Subsonic 70. func coverArtID(a dbq.Album) string { - if a.CoverArtPath == nil || *a.CoverArtPath == "" { - return "" - } return uuidToID(a.ID) }