mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Make format extension optional
The format extension defaults to the name of the format if it is not provided.
This commit is contained in:
parent
2ebb8ee025
commit
ae9ece1e62
1 changed files with 2 additions and 2 deletions
|
|
@ -60,10 +60,10 @@ def get_format(fmt=None):
|
|||
try:
|
||||
format_info = config['convert']['formats'][fmt].get(dict)
|
||||
command = format_info['command']
|
||||
extension = format_info['extension']
|
||||
extension = format_info.get('extension', fmt)
|
||||
except KeyError:
|
||||
raise ui.UserError(
|
||||
u'convert: format {0} needs "command" and "extension" fields'
|
||||
u'convert: format {0} needs the "command" field'
|
||||
.format(fmt)
|
||||
)
|
||||
except ConfigTypeError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue