diff --git a/beetsplug/fuzzy.py b/beetsplug/fuzzy.py index e3ba372f8..d017ff0c2 100644 --- a/beetsplug/fuzzy.py +++ b/beetsplug/fuzzy.py @@ -20,6 +20,7 @@ from __future__ import (division, absolute_import, print_function, from beets.plugins import BeetsPlugin from beets.dbcore.query import StringFieldQuery +from beets import config import difflib @@ -30,7 +31,7 @@ class FuzzyQuery(StringFieldQuery): if pattern.islower(): val = val.lower() queryMatcher = difflib.SequenceMatcher(None, pattern, val) - threshold = self.config['threshold'].as_number() + threshold = config['fuzzy']['threshold'].as_number() return queryMatcher.quick_ratio() >= threshold diff --git a/docs/changelog.rst b/docs/changelog.rst index f8f1c00ff..04b4e1292 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -29,6 +29,8 @@ Little fixes and improvements: with Discogs on setup. :bug:`1417` * :doc:`/plugins/importadded`: Fix a crash when importing singletons in-place. :bug:`1416` +* :doc:`/plugins/fuzzy`: Fix a regression causing a crash in the last release. + :bug:`1422` 1.3.11 (April 5, 2015) ----------------------