mirror of
https://github.com/beetbox/beets.git
synced 2025-12-08 09:34:23 +01:00
add threshold option to echosim command
This commit is contained in:
parent
1f486fc9b0
commit
1e7fc76817
1 changed files with 4 additions and 1 deletions
|
|
@ -446,11 +446,14 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin):
|
|||
fetch_cmd.func = fetch_func
|
||||
|
||||
sim_cmd = ui.Subcommand('echosim', help='show related files')
|
||||
sim_cmd.parser.add_option('-t', '--threshold', dest='threshold',
|
||||
action='store', type='float', default=0.15,
|
||||
help='Set difference threshold')
|
||||
|
||||
def sim_func(lib, opts, args):
|
||||
self.config.set_args(opts)
|
||||
for item in lib.items(ui.decargs(args)):
|
||||
similar(lib, item)
|
||||
similar(lib, item, opts.threshold)
|
||||
|
||||
sim_cmd.func = sim_func
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue