[gnome-music/wip/jfelder/uniquify-player-playlists: 2/2] player: Change playlist_id property to a string
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/uniquify-player-playlists: 2/2] player: Change playlist_id property to a string
- Date: Sat, 8 Dec 2018 06:38:22 +0000 (UTC)
commit 8325cac3a35996e14a3ef838b8ff3b87f696c2bd
Author: Jean Felder <jfelder src gnome org>
Date: Fri Dec 7 15:58:38 2018 +0100
player: Change playlist_id property to a string
ALBUM album id (from grilo)
ARTIST artist name
PLAYLIST playlist id (from grilo)
SEARCH_RESULT empty string
SONGS empty string
gnomemusic/mpris.py | 2 +-
gnomemusic/player.py | 7 ++++---
gnomemusic/views/searchview.py | 2 +-
gnomemusic/views/songsview.py | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index a1701fae..15167906 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.SONGS, None, model, iter_)
+ self.player.set_playlist(PlayerPlaylist.Type.SONGS, "", model, iter_)
self.player.play()
@log
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index e4760e67..70007e4e 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -458,12 +458,13 @@ class PlayerPlaylist(GObject.GObject):
self._repeat = mode
self._settings.set_enum('repeat', mode)
- @GObject.Property(type=int, flags=GObject.ParamFlags.READABLE)
+ @GObject.Property(type=str, flags=GObject.ParamFlags.READABLE,
+ default=None)
def playlist_id(self):
"""Get playlist unique identifier.
:returns: playlist id
- :rtype: int
+ :rtype: string
"""
return self._id
@@ -797,7 +798,7 @@ class Player(GObject.GObject):
"""Playlist id getter
:returns: PlayerPlaylist identifier. None if no playlist.
- :rtype: int
+ :rtype: string
"""
return self._playlist.props.playlist_id
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index dd9444f5..5435257c 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -164,7 +164,7 @@ class SearchView(BaseView):
if self.model[_iter][11] != ValidationStatus.FAILED:
c_iter = self._songs_model.convert_child_iter_to_iter(_iter)[1]
self.player.set_playlist(
- PlayerPlaylist.Type.SEARCH_RESULT, None, self._songs_model,
+ PlayerPlaylist.Type.SEARCH_RESULT, "", self._songs_model,
c_iter)
self.player.play()
else: # Headers
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index 22451bf0..fc3ff557 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -204,7 +204,7 @@ class SongsView(BaseView):
itr = self.model.get_iter(path)
self.player.set_playlist(
- PlayerPlaylist.Type.SONGS, None, self.model, itr)
+ PlayerPlaylist.Type.SONGS, "", self.model, itr)
self.player.play()
@log
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]