fix: Enable Loop mode sync for MPRIS

Loop mode changes were being correctly reflected in Supersonic, when
updated in the toolbar, but not the other way around. We were only
missing an `Options` changes emit when loop mode is changed in
Supersonic.
This commit is contained in:
Michael Manganiello
2024-02-24 15:17:13 -03:00
parent 95aad16d16
commit c7dfc9efb3
+5
View File
@@ -73,6 +73,11 @@ func NewMPRISHandler(playerName string, pm *PlaybackManager) *MPRISHandler {
m.evt.Player.OnVolume()
}
})
pm.OnLoopModeChange(func(loopMode LoopMode) {
if m.connErr == nil {
m.evt.Player.OnOptions()
}
})
emitPlayStatus := func() {
if m.connErr == nil {
m.evt.Player.OnPlayPause()