[gnome-settings-daemon/wip/hadess/more-mpris-fixes: 1/2] media-keys: Fix Repeat toggling




commit dda761a2a91f30cc2d463c478c02864804130370
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 27 14:38:31 2021 +0200

    media-keys: Fix Repeat toggling
    
    Repeat is the name of the key within gnome-settings-daemon, LoopStatus
    is the name of the MPRIS property. Make sure to use the correct one each
    time.

 plugins/media-keys/gsd-media-keys-manager.c | 2 +-
 plugins/media-keys/mpris-controller.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 2f898d59..498a49cd 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1724,7 +1724,7 @@ do_multimedia_player_action (GsdMediaKeysManager *manager,
                 } else if (g_str_equal (key, "FastForward")) {
                         if (mpris_controller_seek (priv->mpris_controller, FASTFORWARD_MSEC))
                                 return TRUE;
-                } else if (g_str_equal (key, "LoopStatus")) {
+                } else if (g_str_equal (key, "Repeat")) {
                         if (mpris_controller_toggle (priv->mpris_controller, "LoopStatus"))
                                 return TRUE;
                 } else if (g_str_equal (key, "Shuffle")) {
diff --git a/plugins/media-keys/mpris-controller.c b/plugins/media-keys/mpris-controller.c
index de113adb..d60d362e 100644
--- a/plugins/media-keys/mpris-controller.c
+++ b/plugins/media-keys/mpris-controller.c
@@ -149,7 +149,7 @@ mpris_controller_toggle (MprisController *self, const gchar *property)
   if (!self->mpris_client_proxy)
     return FALSE;
 
-  if (g_str_equal (property, "Repeat")) {
+  if (g_str_equal (property, "LoopStatus")) {
     g_autoptr(GDBusProxy) props = NULL;
     g_autoptr(GVariant) loop_status;
     const gchar *status_str, *new_status;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]