make sure to set lyrics nil when stopping

This commit is contained in:
Drew Weymouth
2024-05-25 10:48:20 -07:00
parent 4ba358ad23
commit 8caab9bd43
+2 -3
View File
@@ -205,9 +205,7 @@ func (a *NowPlayingPage) OnSongChange(song, _ *mediaprovider.Track) {
a.card.Update(song)
if song == nil {
a.card.SetCoverImage(nil)
return
}
} else {
a.imageLoadCancel = a.im.GetFullSizeCoverArtAsync(song.CoverArtID, func(img image.Image, err error) {
if err != nil {
log.Printf("error loading cover art: %v\n", err)
@@ -215,6 +213,7 @@ func (a *NowPlayingPage) OnSongChange(song, _ *mediaprovider.Track) {
a.card.SetCoverImage(img)
}
})
}
if a.tabs != nil && a.tabs.SelectedIndex() == 1 /*lyrics*/ {
a.updateLyrics()