diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index db2d8a517a..eab6ab4408 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -411,7 +411,7 @@ def _tags_for(self, obj, min_weight=None): # Filter by weight (optionally). if min_weight: - res = [el for el in res if (int(el.weight) or 0) >= min_weight] + res = [el for el in res if (int(el.weight or 0)) >= min_weight] # Get strings from tags. res = [el.item.get_name().lower() for el in res]