[gnome-music] mpris: Fix set_playlist



commit a19af4362294f1148a51107d1cb59785bb962514
Author: Marinus Schraal <mschraal src gnome org>
Date:   Mon Mar 13 21:59:55 2017 +0100

    mpris: Fix set_playlist
    
    set_playlist had a discovery field added, but not all calls can be made
    with this field. Set a safe default value, which may not always be the
    required field, but should not bomb out.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779052

 gnomemusic/player.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 6876477..ae0577e 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -750,8 +750,11 @@ class Player(GObject.GObject):
         else:
             self.set_playing(True)
 
+    # FIXME: set the discovery field to 11 to be safe, but for some
+    # models it is 12.
     @log
-    def set_playlist(self, type, id, model, iter, field, discovery_status_field):
+    def set_playlist(self, type, id, model, iter, field,
+                     discovery_status_field=11):
         self.stop()
 
         old_playlist = self.playlist


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