From ab5bd82fbcb148e9048d479946a8a34863abf9f7 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Tue, 26 May 2026 22:39:59 +0200 Subject: [PATCH] fix(client): copy Art.URL into ContainerArt when storing preset StoreCurrentAsPreset only used ContentItem.ContainerArt for the stored artwork URL. For Spotify (and some other streaming sources) the speaker populates the top-level NowPlaying.Art.URL field instead, leaving ContainerArt empty, which caused preset tiles to show as text-only. When ContainerArt is empty and Art.URL is present with artImageStatus IMAGE_PRESENT, copy the URL into a shallow-copy of the ContentItem before storing it. Devices where ContainerArt is already set are unaffected. Co-Authored-By: Claude Sonnet 4.6 --- pkg/client/client.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index 921812a..85de6e5 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -424,7 +424,19 @@ func (c *Client) StoreCurrentAsPreset(id int) error { return fmt.Errorf("current content cannot be saved as preset") } - return c.StorePreset(id, nowPlaying.ContentItem) + // Streaming services (Spotify, TuneIn, …) put the artwork URL in the + // top-level element of the now-playing response, not inside + // ContentItem.containerArt. Copy it over before storing so the preset + // slot shows the album/station cover image. + ci := *nowPlaying.ContentItem // shallow copy — no pointer fields in ContentItem + if ci.ContainerArt == "" && + nowPlaying.Art != nil && + nowPlaying.Art.ArtImageStatus == "IMAGE_PRESENT" && + nowPlaying.Art.URL != "" { + ci.ContainerArt = nowPlaying.Art.URL + } + + return c.StorePreset(id, &ci) } // RemovePreset deletes a preset from the SoundTouch device