mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 11:42:43 +01:00
Set required properties for format merging
This commit is contained in:
parent
cefcb9fde3
commit
a9c5e5ca6e
@ -702,7 +702,7 @@ def process_video_result(self, info_dict, download=True):
|
|||||||
if req_format in ('-1', 'all'):
|
if req_format in ('-1', 'all'):
|
||||||
formats_to_download = formats
|
formats_to_download = formats
|
||||||
else:
|
else:
|
||||||
# We can accept formats requestd in the format: 34/5/best, we pick
|
# We can accept formats requested in the format: 34/5/best, we pick
|
||||||
# the first that is available, starting from left
|
# the first that is available, starting from left
|
||||||
req_formats = req_format.split('/')
|
req_formats = req_format.split('/')
|
||||||
for rf in req_formats:
|
for rf in req_formats:
|
||||||
@ -712,7 +712,11 @@ def process_video_result(self, info_dict, download=True):
|
|||||||
formats_info = (self.select_format(format_1, formats),
|
formats_info = (self.select_format(format_1, formats),
|
||||||
self.select_format(format_2, formats))
|
self.select_format(format_2, formats))
|
||||||
if all(formats_info):
|
if all(formats_info):
|
||||||
selected_format = {'requested_formats': formats_info}
|
selected_format = {
|
||||||
|
'requested_formats': formats_info,
|
||||||
|
'format': rf,
|
||||||
|
'ext': formats_info[0]['ext'],
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
selected_format = None
|
selected_format = None
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user