add status line with media info to bottom of now playing page

This commit is contained in:
Drew Weymouth
2023-06-05 08:55:35 -07:00
parent 6d5900b692
commit fedb9fd70d
5 changed files with 153 additions and 6 deletions
+4
View File
@@ -116,6 +116,10 @@ func (p *PlaybackManager) NowPlaying() *mediaprovider.Track {
return p.playQueue[p.nowPlayingIdx]
}
func (p *PlaybackManager) NowPlayingIndex() int {
return int(p.nowPlayingIdx)
}
// Sets a callback that is notified whenever a new song begins playing.
func (p *PlaybackManager) OnSongChange(cb func(nowPlaying *mediaprovider.Track, justScrobbledIfAny *mediaprovider.Track)) {
p.onSongChange = append(p.onSongChange, cb)