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.
This commit is contained in:
2026-04-19 19:28:30 +00:00
parent 547adb74ac
commit 3c95740ebe
+4 -5
View File
@@ -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)
}