mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-05-10 15:54:49 +09:00
Merge ce031e9d18cd8ec154a749ba5c066c8c0f7eec6b into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6
This commit is contained in:
commit
b6b79c3261
@ -136,6 +136,11 @@ class TestFormatSelection(unittest.TestCase):
|
||||
]
|
||||
info_dict = _make_result(formats)
|
||||
|
||||
ydl = YDL({'format': ''}) # no criteria => anything goes
|
||||
ydl.process_ie_result(info_dict.copy())
|
||||
downloaded = ydl.downloaded_info_dicts[0]
|
||||
self.assertEqual(downloaded['format_id'], '35')
|
||||
|
||||
ydl = YDL({'format': '20/47'})
|
||||
ydl.process_ie_result(info_dict.copy())
|
||||
downloaded = ydl.downloaded_info_dicts[0]
|
||||
|
@ -1309,6 +1309,9 @@ class YoutubeDL(object):
|
||||
'{0}\n\t{1}\n\t{2}^'.format(note, format_spec, ' ' * start[1]))
|
||||
return SyntaxError(message)
|
||||
|
||||
if not format_spec:
|
||||
format_spec = 'worst'
|
||||
|
||||
PICKFIRST = 'PICKFIRST'
|
||||
MERGE = 'MERGE'
|
||||
SINGLE = 'SINGLE'
|
||||
|
Loading…
x
Reference in New Issue
Block a user