From fa105157998439dc0849d61f48b3817d8aefd211 Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Wed, 16 Oct 2013 11:31:18 +0200 Subject: [PATCH 1/2] Bugfix for Album.get_top_tracks workaround. --- beetsplug/lastgenre/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 790e34da0..ddb295acd 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -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 [] From 0ff15c5c4db660cbecbaaa71b42f049db12616f4 Mon Sep 17 00:00:00 2001 From: Peter Schnebel Date: Wed, 16 Oct 2013 11:35:26 +0200 Subject: [PATCH 2/2] The way of the impatient is filled with useless commits :( --- beetsplug/lastgenre/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index ddb295acd..2b4452ab3 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -55,7 +55,7 @@ def _tags_for(obj): not found or another error occurs. """ try: - if isinstance(el, pylast.Album): + if isinstance(obj, pylast.Album): res = super(pylast.Album, obj).get_top_tags() else: res = obj.get_top_tags()