Album.get_top_tracks now returns TopItems. Closes #86.
This commit is contained in:
parent
e388db1e2f
commit
44318fccc4
2 changed files with 16 additions and 18 deletions
15
pylast.py
15
pylast.py
|
@ -1282,21 +1282,6 @@ class Album(_BaseObject, _Taggable):
|
|||
|
||||
return _number(_extract(self._request("album.getInfo", cacheable = True), "listeners"))
|
||||
|
||||
def get_top_tags(self, limit=None):
|
||||
"""Returns a list of the most-applied tags to this album."""
|
||||
|
||||
doc = self._request("album.getInfo", True)
|
||||
e = doc.getElementsByTagName("toptags")[0]
|
||||
|
||||
seq = []
|
||||
for name in _extract_all(e, "name"):
|
||||
seq.append(Tag(name, self.network))
|
||||
|
||||
if limit:
|
||||
seq = seq[:limit]
|
||||
|
||||
return seq
|
||||
|
||||
def get_tracks(self):
|
||||
"""Returns the list of Tracks on this album."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue