[gnome-music/wip/jfelder/3-30-fix-mpris-playlisttype] mpris: Prevent a cash from play call with no playlist



commit 68f6c867b9edd19557a1f5c784d05057ca09e143
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Sep 5 19:14:48 2018 +0200

    mpris: Prevent a cash from play call with no playlist
    
    When trying to play a song launch from a MPRIS client when no playlist
    is set, the first song from the SongsView is loaded. This results in a
    crash as the PlayerPlaylist.Type is wrong.
    Fix it by using the correct name.
    
    (cherry picked from commit f568801eaee4ca101c16bed559fbb0b94a1f0640)

 gnomemusic/mpris.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 252ca90a..2a0d6515 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -467,7 +467,7 @@ class MediaPlayer2Service(Server):
         if self.first_song_handler:
             model.disconnect(self.first_song_handler)
             self.first_song_handler = 0
-        self.player.set_playlist(PlayerPlaylist.Type.SONG, None, model, iter_)
+        self.player.set_playlist(PlayerPlaylist.Type.SONGS, None, model, iter_)
         self.player.play()
 
     @log


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