[gnome-music/wip/jfelder/restore-mpris-playlists: 6/9] mpris: Restore update_song_lists support
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/restore-mpris-playlists: 6/9] mpris: Restore update_song_lists support
- Date: Fri, 27 Sep 2019 14:32:38 +0000 (UTC)
commit 4cc5fc22d8e292e18edcca70854c3652752fa3bb
Author: Jean Felder <jfelder src gnome org>
Date: Sat Sep 21 20:59:53 2019 +0200
mpris: Restore update_song_lists support
This functionality was disabled during the core rewrite.
gnomemusic/mpris.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 69f47ec4..ae4d35aa 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -300,7 +300,7 @@ class MPRIS(DBusInterface):
self._playlists_loaded_id = self._coremodel.connect(
"playlists-loaded", self._on_playlists_loaded)
- self._player_previous_type = None
+ self._player_playlist_type = None
self._path_list = []
self._metadata_list = []
self._previous_can_go_next = False
@@ -427,7 +427,7 @@ class MPRIS(DBusInterface):
index_min = current_position - self._playlist_nb_songs
index_max = current_position + self._playlist_nb_songs + 1
- if self._player.get_playlist_type() == PlayerPlaylist.Type.ALBUM:
+ if self._player_playlist_type == PlayerPlaylist.Type.ALBUM:
index_min = 0
index_max = self._player_model.get_n_items()
@@ -576,6 +576,7 @@ class MPRIS(DBusInterface):
@log
def _on_player_playlist_changed(self, coremodel, playlist_type):
+ self._player_playlist_type = playlist_type
self._update_songs_list()
mpris_playlist = self._get_active_playlist()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]