Skip to content

Commit

Permalink
make sure to set lyrics nil when stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed May 25, 2024
1 parent 4ba358a commit 8caab9b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions ui/browsing/nowplayingpage.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,16 @@ 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)
} else {
a.card.SetCoverImage(img)
}
})
}

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)
} else {
a.card.SetCoverImage(img)
}
})

if a.tabs != nil && a.tabs.SelectedIndex() == 1 /*lyrics*/ {
a.updateLyrics()
}
Expand Down

0 comments on commit 8caab9b

Please sign in to comment.