From 8b1511a8afa718954880103eb7c1e2944b9597b4 Mon Sep 17 00:00:00 2001 From: Philippe Mongeau Date: Sun, 10 Mar 2013 20:39:02 -0400 Subject: [PATCH] fix fuzzy config --- beetsplug/fuzzy.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/beetsplug/fuzzy.py b/beetsplug/fuzzy.py index 69c47a745..4362cbb9f 100644 --- a/beetsplug/fuzzy.py +++ b/beetsplug/fuzzy.py @@ -46,12 +46,11 @@ class FuzzyQuery(PluginQuery): class FuzzyPlugin(BeetsPlugin): def __init__(self): super(FuzzyPlugin, self).__init__(self) - self.config.add({ - 'threshold': 0.7, - 'prefix': '~', - }) def queries(self): - return { - self.config['prefix'].get(): FuzzyQuery, - } + try: + prefix = beets.config['fuzzy']['prefix'].get(basestring) + except confit.NotFoundError: + prefix = '~' + + return {prefix: FuzzyQuery}