lastgenre: tolerate el.weight is None

This commit is contained in:
Adrian Sampson 2014-02-11 09:49:15 -08:00
parent 7190964e05
commit 3dd9e4622f
2 changed files with 3 additions and 1 deletions

View file

@ -72,7 +72,7 @@ def _tags_for(obj):
dbg = []
for el in res:
weight = int(el.weight)
weight = int(el.weight or 0)
tag = el.item.get_name().lower()
if _is_allowed(tag):
if min_weight > -1 and min_weight > weight and len(tags) > 0:

View file

@ -81,6 +81,8 @@ Other little fixes:
local image files are no longer completely ignored.
* :doc:`/plugins/echonest`: Fix an issue causing the plugin to appear twice in
the output of the ``beet version`` command.
* :doc:`/plugins/lastgenre`: Fix an occasional crash when no tag weight was
returned by Last.fm.
1.3.2 (December 22, 2013)