From fb6c77aa8ff08cc4cd4cd469db7ca3e08e147f03 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Sun, 12 Nov 2023 20:33:51 -0800 Subject: [PATCH] load artist page image preferentially from CoverArt property rather than LastFM url --- ui/browsing/artistpage.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/browsing/artistpage.go b/ui/browsing/artistpage.go index 1316ebd..e3a329a 100644 --- a/ui/browsing/artistpage.go +++ b/ui/browsing/artistpage.go @@ -337,6 +337,14 @@ func (a *ArtistPageHeader) Update(artist *mediaprovider.ArtistWithAlbums) { a.artistID = artist.ID a.titleDisp.Segments[0].(*widget.TextSegment).Text = artist.Name a.titleDisp.Refresh() + if artist.CoverArtID == "" { + return + } + if im, err := a.artistPage.im.GetCoverThumbnail(artist.CoverArtID); err != nil { + log.Printf("failed to load artist image: %v", err) + } else { + a.artistImage.SetImage(im, true /*tappable*/) + } } func (a *ArtistPageHeader) UpdateInfo(info *mediaprovider.ArtistInfo) {