fix: use CoverArtID if available and LastFM image url otherwise
This commit is contained in:
@@ -459,10 +459,12 @@ func (a *ArtistPageHeader) Update(artist *mediaprovider.ArtistWithAlbums, im *ba
|
||||
a.favoriteBtn.IsFavorited = artist.Favorite
|
||||
a.favoriteBtn.Refresh()
|
||||
a.artistID = artist.ID
|
||||
a.artistImageID = artist.CoverArtID
|
||||
a.titleDisp.Segments[0].(*widget.TextSegment).Text = artist.Name
|
||||
a.titleDisp.Refresh()
|
||||
|
||||
if artist.CoverArtID == "" {
|
||||
return
|
||||
}
|
||||
a.artistImageID = artist.CoverArtID
|
||||
go func() {
|
||||
if cover, err := im.GetCoverThumbnail(artist.CoverArtID); err == nil {
|
||||
a.artistImage.SetImage(cover, true)
|
||||
@@ -520,6 +522,11 @@ func (a *ArtistPageHeader) UpdateInfo(info *mediaprovider.ArtistInfo) {
|
||||
}
|
||||
|
||||
func (a *ArtistPageHeader) showPopUpCover() {
|
||||
if a.artistImageID == "" {
|
||||
if im := a.artistImage.Image(); im != nil {
|
||||
a.artistPage.contr.ShowPopUpImage(im)
|
||||
}
|
||||
} else {
|
||||
if a.fullSizeCoverFetching {
|
||||
return
|
||||
}
|
||||
@@ -534,6 +541,7 @@ func (a *ArtistPageHeader) showPopUpCover() {
|
||||
a.artistPage.contr.ShowPopUpImage(cover)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *ArtistPageHeader) toggleFavorited() {
|
||||
params := mediaprovider.RatingFavoriteParameters{ArtistIDs: []string{a.artistID}}
|
||||
|
||||
Reference in New Issue
Block a user