[gnome-music/wip/jfelder/mpris-cleanup: 22/29] mpris: Make playlists attribute internal
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/mpris-cleanup: 22/29] mpris: Make playlists attribute internal
- Date: Mon, 8 Apr 2019 16:29:37 +0000 (UTC)
commit d7ce4a196077021c4024920b5e5662f363d5972c
Author: Jean Felder <jfelder src gnome org>
Date: Thu Mar 21 08:57:14 2019 +0100
mpris: Make playlists attribute internal
gnomemusic/mpris.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index b5705139..1bf4b52b 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -295,7 +295,7 @@ class MPRIS(DBusInterface):
playlists.connect('playlist-deleted', self._on_playlists_count_changed)
playlists.connect('playlist-renamed', self._on_playlist_renamed)
grilo.connect('ready', self._on_grilo_ready)
- self.playlists = []
+ self._playlists = []
self._player_previous_type = None
self._path_list = []
self._metadata_list = []
@@ -435,7 +435,7 @@ class MPRIS(DBusInterface):
@log
def _get_playlist_from_dbus_path(self, playlist_path):
- for playlist in self.playlists:
+ for playlist in self._playlists:
if playlist_path == self._get_playlist_dbus_path(playlist):
return playlist
return None
@@ -448,7 +448,7 @@ class MPRIS(DBusInterface):
@log
def _get_playlist_from_id(self, playlist_id):
- for playlist in self.playlists:
+ for playlist in self._playlists:
if playlist_id == playlist.get_id():
return playlist
return None
@@ -604,7 +604,7 @@ class MPRIS(DBusInterface):
@log
def _reload_playlists(self):
def query_playlists_callback(playlists):
- self.playlists = playlists
+ self._playlists = playlists
self._properties_changed(MPRIS.MEDIA_PLAYER2_PLAYLISTS_IFACE,
{
'PlaylistCount': GLib.Variant('u', len(playlists)),
@@ -724,7 +724,7 @@ class MPRIS(DBusInterface):
return []
mpris_playlists = [self._get_mpris_playlist_from_playlist(playlist)
- for playlist in self.playlists]
+ for playlist in self._playlists]
if not reverse:
return mpris_playlists[index:index + max_count]
@@ -782,7 +782,7 @@ class MPRIS(DBusInterface):
}
elif interface_name == MPRIS.MEDIA_PLAYER2_PLAYLISTS_IFACE:
return {
- 'PlaylistCount': GLib.Variant('u', len(self.playlists)),
+ 'PlaylistCount': GLib.Variant('u', len(self._playlists)),
'Orderings': GLib.Variant('as', ['Alphabetical']),
'ActivePlaylist': GLib.Variant('(b(oss))', self._get_active_playlist()),
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]