Fix protocol and join-parts interaction
This commit is contained in:
parent
8725b5d3c7
commit
3222b0dc7d
@ -1327,11 +1327,11 @@ class YoutubeDL(object):
|
|||||||
# Automatically determine file extension if missing
|
# Automatically determine file extension if missing
|
||||||
if 'ext' not in format:
|
if 'ext' not in format:
|
||||||
format['ext'] = determine_ext(format['url']).lower()
|
format['ext'] = determine_ext(format['url']).lower()
|
||||||
# Automatically determine protocol if missing (useful for format
|
|
||||||
# selection purposes)
|
|
||||||
if 'protocol' not in format:
|
|
||||||
format['protocol'] = determine_protocol(format)
|
|
||||||
if 'parts' not in format:
|
if 'parts' not in format:
|
||||||
|
# Automatically determine protocol if missing (useful for format
|
||||||
|
# selection purposes)
|
||||||
|
if 'protocol' not in format:
|
||||||
|
format['protocol'] = determine_protocol(format)
|
||||||
# Add HTTP headers, so that external programs can use them from the
|
# Add HTTP headers, so that external programs can use them from the
|
||||||
# json output
|
# json output
|
||||||
full_format_info = info_dict.copy()
|
full_format_info = info_dict.copy()
|
||||||
|
@ -863,7 +863,7 @@ class InfoExtractor(object):
|
|||||||
if f.get('ext') in ['f4f', 'f4m']: # Not yet supported
|
if f.get('ext') in ['f4f', 'f4m']: # Not yet supported
|
||||||
preference -= 0.5
|
preference -= 0.5
|
||||||
|
|
||||||
proto_preference = 0 if determine_protocol(f) in ['http', 'https'] else -0.1
|
proto_preference = 0 if 'url' in f and determine_protocol(f) in ['http', 'https'] else -0.1
|
||||||
|
|
||||||
if f.get('vcodec') == 'none': # audio only
|
if f.get('vcodec') == 'none': # audio only
|
||||||
if self._downloader.params.get('prefer_free_formats'):
|
if self._downloader.params.get('prefer_free_formats'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user