[gnome-music/wip/jfelder/mpris-limit-get-songs: 12/23] mpris: Avoid confusion between Playlists and PlayerPlaylist
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/mpris-limit-get-songs: 12/23] mpris: Avoid confusion between Playlists and PlayerPlaylist
- Date: Thu, 6 Dec 2018 10:59:44 +0000 (UTC)
commit 1556ea46e6b6e673f7b8d91d99b8a777efd675e8
Author: Jean Felder <jfelder src gnome org>
Date: Tue Oct 23 19:10:58 2018 +0200
mpris: Avoid confusion between Playlists and PlayerPlaylist
Rename PlayerPlaylist specific functions to avoid the confusion with
the functions that deal with Playlists.
gnomemusic/mpris.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index a1701fae..5a96f347 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -229,7 +229,8 @@ class MediaPlayer2Service(Server):
self.player.connect('volume-changed', self._on_volume_changed)
self.player.connect('prev-next-invalidated', self._on_prev_next_invalidated)
self.player.connect('seek-finished', self._on_seek_finished)
- self.player.connect('playlist-changed', self._on_playlist_changed)
+ self.player.connect(
+ 'playlist-changed', self._on_player_playlist_changed)
self.player_toolbar = app.get_active_window()._player_toolbar
self.player_toolbar.connect(
'thumbnail-updated', self._on_thumbnail_updated)
@@ -475,8 +476,8 @@ class MediaPlayer2Service(Server):
self.Seeked(int(position_second * 1e6))
@log
- def _on_playlist_changed(self, player, data=None):
- self._on_playlist_modified()
+ def _on_player_playlist_changed(self, klass):
+ self._on_player_playlist_modified()
self.PropertiesChanged(MediaPlayer2Service.MEDIA_PLAYER2_PLAYLISTS_IFACE,
{
@@ -485,7 +486,7 @@ class MediaPlayer2Service(Server):
[])
@log
- def _on_playlist_modified(self, path=None, _iter=None, data=None):
+ def _on_player_playlist_modified(self, path=None, _iter=None, data=None):
if self.player.props.current_song:
track_list = self._get_track_list()
self.TrackListReplaced(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]