Interface BottomPanel through PlaybackManager to reduce direct dependency on Player

This commit is contained in:
Michael Manganiello
2023-06-18 22:43:03 -03:00
parent 2ab19f65e1
commit 4629ede7a7
3 changed files with 18 additions and 15 deletions
+6
View File
@@ -291,6 +291,12 @@ func (p *PlaybackManager) SetReplayGainOptions(config ReplayGainConfig) {
})
}
// Changes the loop mode of the player to the next one.
// Useful for toggling UI elements, to change modes without knowing the current player mode.
func (p *PlaybackManager) SetNextLoopMode() error {
return p.player.SetNextLoopMode()
}
// call BEFORE updating p.nowPlayingIdx
func (p *PlaybackManager) checkScrobble() {
if !p.scrobbleCfg.Enabled || len(p.playQueue) == 0 || p.nowPlayingIdx < 0 {