mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 14:52:38 +00:00
Fix output indenting for --list-formats
This commit is contained in:
parent
b9a836515f
commit
94badb2599
@ -780,10 +780,11 @@ class YoutubeDL(object):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
formats_s = list(map(line, info_dict.get('formats', [info_dict])))
|
formats = info_dict.get('formats', [info_dict])
|
||||||
if len(formats_s) != 1:
|
formats_s = list(map(line, formats))
|
||||||
formats_s[0] += (' ' if formats_s[0] else '') + '(worst)'
|
if len(formats) > 1:
|
||||||
formats_s[-1] += (' ' if formats_s[-1] else '') + '(best)'
|
formats_s[0] += (' ' if formats[0].get('format_note') else '') + '(worst)'
|
||||||
|
formats_s[-1] += (' ' if formats[-1].get('format_note') else '') + '(best)'
|
||||||
|
|
||||||
header_line = line({
|
header_line = line({
|
||||||
'format_id': u'format code', 'ext': u'extension',
|
'format_id': u'format code', 'ext': u'extension',
|
||||||
|
Loading…
Reference in New Issue
Block a user