[gnome-music/wip/jfelder/mpris-coalesce-properties-changes: 1/2] mpris: Do not send the Tracks list when the playlist changed.



commit 19d345df7b68ec6cd6a11a0ec3d75fe5e3d79d5e
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Jun 3 14:26:35 2019 +0200

    mpris: Do not send the Tracks list when the playlist changed.
    
    According to MPRIS specifications: "When this property changes, the
    org.freedesktop.DBus.Properties.PropertiesChanged signal is emitted,
    but the new value is not sent."
    
    The PropertiesChanged signal is already emitted by TrackListReplaced.
    
    Related: #43

 gnomemusic/mpris.py | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 96eacf25..d82e2f6a 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -375,9 +375,6 @@ class MediaPlayer2Service(Server):
                 or previous_path_list[-1] != self._path_list[-1]):
             current_song_path = self._get_song_dbus_path()
             self.TrackListReplaced(self._path_list, current_song_path)
-            self.PropertiesChanged(
-                MediaPlayer2Service.MEDIA_PLAYER2_TRACKLIST_IFACE,
-                {'Tracks': GLib.Variant('ao', self._path_list), }, [])
 
     @log
     def _get_playlist_dbus_path(self, playlist):


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