load artist page image preferentially from CoverArt property rather than LastFM url

This commit is contained in:
Drew Weymouth
2023-11-14 09:05:02 -08:00
parent 7d3e942e3f
commit fb6c77aa8f
+8
View File
@@ -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) {