From a8897bb38babda650ef0c63809ae42dd29a15fd7 Mon Sep 17 00:00:00 2001 From: Amr Hassan Date: Mon, 23 Feb 2009 08:35:09 +0000 Subject: [PATCH] * +Artist.get_mbid() --- pylast.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pylast.py b/pylast.py index 3687ece..0f7a5a9 100644 --- a/pylast.py +++ b/pylast.py @@ -721,7 +721,14 @@ class Artist(_BaseObject, _Taggable): """Returns the number of plays on Last.fm.""" return _number(_extract(self._request("artist.getInfo", True), "playcount")) - + + def get_mbid(self): + """Returns the MusicBrainz ID of this artist.""" + + doc = self._request("artist.getInfo", True) + + return _extract(doc, "mbid") + def get_listener_count(self): """Returns the number of liteners on Last.fm.""" @@ -2455,7 +2462,7 @@ class AuthenticatedUser(User): doc = self._request("user.getInfo", True) return _number(_extract(doc, "playcount")) - + def _get_recommended_events_pagecount(self): """Returns the number of pages in the past events."""