mirror of
https://github.com/beetbox/beets.git
synced 2025-12-08 01:23:09 +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 = ui.Subcommand('replaygain', help=u'analyze for ReplayGain')
|
||||||
cmd.parser.add_album_option()
|
cmd.parser.add_album_option()
|
||||||
cmd.parser.add_option(
|
cmd.parser.add_option(
|
||||||
"-t", "--threads", dest="threads",
|
"-t", "--threads", dest="threads", type=int,
|
||||||
help=u'change the number of threads, \
|
help=u'change the number of threads, \
|
||||||
defaults to maximum available processors'
|
defaults to maximum available processors'
|
||||||
)
|
)
|
||||||
|
|
@ -1480,9 +1480,10 @@ class ReplayGainPlugin(BeetsPlugin):
|
||||||
"""
|
"""
|
||||||
write = ui.should_write(opts.write)
|
write = ui.should_write(opts.write)
|
||||||
force = opts.force
|
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:
|
if opts.album:
|
||||||
for album in lib.albums(ui.decargs(args)):
|
for album in lib.albums(ui.decargs(args)):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue