From 20c61f4668b82c52f8be1cfc9298351ccac8af87 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Fri, 30 Jan 2026 08:45:26 -0800 Subject: [PATCH] Avoid triggering cover art dissolve animation with same cover image --- ui/browsing/nowplayingpage.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/browsing/nowplayingpage.go b/ui/browsing/nowplayingpage.go index 04eda39..97716b9 100644 --- a/ui/browsing/nowplayingpage.go +++ b/ui/browsing/nowplayingpage.go @@ -43,6 +43,7 @@ type NowPlayingPage struct { curLyrics *mediaprovider.Lyrics curLyricsID string // id of track currently shown in lyrics curRelatedID string // id of track currrently used to populate related list + curCoverArt string // id of cover art currently shown in background / card totalTime float64 lastPlayPos float64 queue []mediaprovider.MediaItem @@ -307,8 +308,12 @@ func (a *NowPlayingPage) OnSongChange(song mediaprovider.MediaItem, lastScrobble a.card.Update(song) if song == nil { a.card.SetCoverImage(nil) - } else { - a.imageLoadCancel = a.im.GetFullSizeCoverArtAsync(song.Metadata().CoverArtID, a.onImageLoaded) + a.curCoverArt = "" + } else if artID := song.Metadata().CoverArtID; artID != a.curCoverArt { + a.imageLoadCancel = a.im.GetFullSizeCoverArtAsync(song.Metadata().CoverArtID, func(img image.Image, err error) { + a.curCoverArt = artID + a.onImageLoaded(img, err) + }) } if a.tabs != nil && a.tabs.SelectedIndex() == 1 /*lyrics*/ {