Bugfix for Album.get_top_tracks workaround.

This commit is contained in:
Peter Schnebel 2013-10-16 11:31:18 +02:00
parent d339e2f815
commit fa10515799

View file

@ -55,7 +55,10 @@ def _tags_for(obj):
not found or another error occurs.
"""
try:
res = super(pylast.Album, obj).get_top_tags()
if isinstance(el, pylast.Album):
res = super(pylast.Album, obj).get_top_tags()
else:
res = obj.get_top_tags()
except PYLAST_EXCEPTIONS as exc:
log.debug(u'last.fm error: %s' % unicode(exc))
return []