[gnome-music/wip/jfelder/3-34-mpris-can-play] mpris: Fix CanPause and CanPlay emission



commit 724d02ba6b3876c9f693d5c8645e5353d1755209
Author: Jean Felder <jfelder src gnome org>
Date:   Sun Nov 3 16:24:22 2019 +0100

    mpris: Fix CanPause and CanPlay emission
    
    Once a song is playing, CanPlay and CanPause are always true.
    
    (cherry picked from commit ac44d6ac50049ae258a51b04a1bf9062d3b7aa1c)

 gnomemusic/mpris.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index f8d91538..a7e0930e 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -531,8 +531,8 @@ class MPRIS(DBusInterface):
             self._previous_can_go_previous = has_previous
 
         if self._previous_can_play is not True:
-            properties["CanPause"] = GLib.Variant("b", has_previous)
-            properties["CanPlay"] = GLib.Variant("b", has_previous)
+            properties["CanPause"] = GLib.Variant("b", True)
+            properties["CanPlay"] = GLib.Variant("b", True)
             self._previous_can_play = True
 
         self._properties_changed(


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