mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 09:04:33 +01:00
Fix --threads argument handling
This commit is contained in:
parent
b126ecafdd
commit
b903584163
1 changed files with 4 additions and 3 deletions
|
|
@ -1458,7 +1458,7 @@ class ReplayGainPlugin(BeetsPlugin):
|
|||
cmd = ui.Subcommand('replaygain', help=u'analyze for ReplayGain')
|
||||
cmd.parser.add_album_option()
|
||||
cmd.parser.add_option(
|
||||
"-t", "--threads", dest="threads",
|
||||
"-t", "--threads", dest="threads", type=int,
|
||||
help=u'change the number of threads, \
|
||||
defaults to maximum available processors'
|
||||
)
|
||||
|
|
@ -1480,9 +1480,10 @@ class ReplayGainPlugin(BeetsPlugin):
|
|||
"""
|
||||
write = ui.should_write(opts.write)
|
||||
force = opts.force
|
||||
threads = opts.threads or self.config['threads'].get(int)
|
||||
|
||||
self.open_pool(threads)
|
||||
if opts.threads != 0:
|
||||
threads = opts.threads or self.config['threads'].get(int)
|
||||
self.open_pool(threads)
|
||||
|
||||
if opts.album:
|
||||
for album in lib.albums(ui.decargs(args)):
|
||||
|
|
|
|||
Loading…
Reference in a new issue