mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 08:56:56 +01:00
#416: workaround comment, py26-ify
This commit is contained in:
parent
3070ac382e
commit
2d2836825f
1 changed files with 6 additions and 1 deletions
|
|
@ -55,6 +55,9 @@ def _tags_for(obj):
|
|||
not found or another error occurs.
|
||||
"""
|
||||
try:
|
||||
# Work around an inconsistency in pylast where
|
||||
# Album.get_top_tags() does not return TopItem instances.
|
||||
# https://code.google.com/p/pylast/issues/detail?id=85
|
||||
if isinstance(obj, pylast.Album):
|
||||
res = super(pylast.Album, obj).get_top_tags()
|
||||
else:
|
||||
|
|
@ -78,7 +81,9 @@ def _tags_for(obj):
|
|||
dbg.append(u'{} [{}]'.format(tag, weight))
|
||||
if len(tags) == count:
|
||||
break
|
||||
log.debug(u'lastfm.tag (min. {}): {}'.format(min_weight, u', '.join(dbg)))
|
||||
log.debug(u'lastfm.tag (min. {0}): {1}'.format(
|
||||
min_weight, u', '.join(dbg)
|
||||
))
|
||||
return tags
|
||||
|
||||
def _is_allowed(genre):
|
||||
|
|
|
|||
Loading…
Reference in a new issue