mirror of
https://github.com/beetbox/beets.git
synced 2026-01-06 07:53:40 +01:00
Added 'quiet' operation mode, prevents start/finish announcements for each file.
This commit is contained in:
parent
52d86f0e6a
commit
80d060db07
2 changed files with 10 additions and 4 deletions
|
|
@ -63,11 +63,13 @@ def get_file_extension():
|
|||
|
||||
|
||||
def encode(source, dest):
|
||||
log.info(u'Started encoding {0}'.format(util.displayable_path(source)))
|
||||
|
||||
command = get_command()
|
||||
quiet = config['convert']['quiet'].get()
|
||||
opts = []
|
||||
|
||||
if not quiet:
|
||||
log.info(u'Started encoding {0}'.format(util.displayable_path(source)))
|
||||
|
||||
for arg in command:
|
||||
arg = arg.encode('utf-8')
|
||||
opts.append(Template(arg).substitute({
|
||||
|
|
@ -86,7 +88,8 @@ def encode(source, dest):
|
|||
util.prune_dirs(os.path.dirname(dest))
|
||||
return
|
||||
|
||||
log.info(u'Finished encoding {0}'.format(util.displayable_path(source)))
|
||||
if not quiet:
|
||||
log.info(u'Finished encoding {0}'.format(util.displayable_path(source)))
|
||||
|
||||
|
||||
def validate_config():
|
||||
|
|
@ -269,8 +272,9 @@ class ConvertPlugin(BeetsPlugin):
|
|||
},
|
||||
},
|
||||
u'max_bitrate': 500,
|
||||
u'embed': True,
|
||||
u'auto': False,
|
||||
u'quiet': False,
|
||||
u'embed': True,
|
||||
u'paths': {},
|
||||
})
|
||||
validate_config()
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ The plugin offers several configuration options, all of which live under the
|
|||
automatically during the ``import`` command. With this option enabled, the
|
||||
importer will transcode all non-MP3 files over the maximum bitrate before
|
||||
adding them to your library.
|
||||
* ``quiet`` mode prevents the plugin from announcing every file it processes.
|
||||
Default: false.
|
||||
* ``paths`` lets you specify the directory structure and naming scheme for the
|
||||
converted files. Use the same format as the top-level ``paths`` section (see
|
||||
:ref:`path-format-config`). By default, the plugin reuses your top-level
|
||||
|
|
|
|||
Loading…
Reference in a new issue