[gnome-music/wip/jfelder/lastfm-ui-part-2: 21/24] scrobbler: Add a property to get account identity
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/lastfm-ui-part-2: 21/24] scrobbler: Add a property to get account identity
- Date: Sat, 15 Feb 2020 11:16:40 +0000 (UTC)
commit 50a83b1548b5f04d5eb7671b68e325554a2e1a93
Author: Jean Felder <jfelder src gnome org>
Date: Tue Jan 14 23:22:32 2020 +0100
scrobbler: Add a property to get account identity
gnomemusic/scrobbler.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/gnomemusic/scrobbler.py b/gnomemusic/scrobbler.py
index cbf52039..dc4f4958 100644
--- a/gnomemusic/scrobbler.py
+++ b/gnomemusic/scrobbler.py
@@ -146,6 +146,15 @@ class GoaLastFM(GObject.GObject):
"""Enable music suport of the Last.fm account"""
self._account.props.music_disabled = False
+ @GObject.Property(type=str, default="", flags=GObject.ParamFlags.READABLE)
+ def identity(self):
+ """Get Last.fm account identity
+
+ :returns: Last.fm account identity
+ :rtype: str
+ """
+ return self._account.props.identity
+
@GObject.Property
def secret(self):
"""Retrieve the Last.fm client secret"""
@@ -243,6 +252,15 @@ class LastFmScrobbler(GObject.GObject):
def configure(self):
self._goa_lastfm.configure()
+ @GObject.Property(type=str, default="", flags=GObject.ParamFlags.READABLE)
+ def identity(self):
+ """Get Last.fm account identity
+
+ :returns: Last.fm account identity
+ :rtype: str
+ """
+ return self._goa_lastfm.props.identity
+
@GObject.Property(type=int, default=GoaLastFM.State.NOT_AVAILABLE)
def account_state(self):
"""Get the Last.fm account state
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]