From c7dfc9efb380645770fdd20ac6dc1f6c3ab48ac2 Mon Sep 17 00:00:00 2001 From: Michael Manganiello Date: Sat, 24 Feb 2024 15:17:13 -0300 Subject: [PATCH] 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. --- backend/mpris.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/mpris.go b/backend/mpris.go index aedb71b..58a9260 100644 --- a/backend/mpris.go +++ b/backend/mpris.go @@ -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()