diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 34c5153ea..8c38eac31 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -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: diff --git a/docs/changelog.rst b/docs/changelog.rst index c25812530..79d60f968 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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)