mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 20:12:33 +01:00
fix fuzzy config
This commit is contained in:
parent
685972bbc5
commit
8b1511a8af
1 changed files with 6 additions and 7 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue