mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2026-01-15 01:03:23 +00:00
Merge ce031e9d18 into 956b8c5855
This commit is contained in:
commit
021b4e6eb7
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -1316,6 +1316,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…
Reference in a new issue