mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-12 20:23:11 +00:00
Fix --compat-option no-direct-merge
This commit is contained in:
parent
03c862794f
commit
d5fe04f5c7
@ -2750,7 +2750,7 @@ class YoutubeDL(object):
|
|||||||
_protocols = set(determine_protocol(f) for f in requested_formats)
|
_protocols = set(determine_protocol(f) for f in requested_formats)
|
||||||
if len(_protocols) == 1: # All requested formats have same protocol
|
if len(_protocols) == 1: # All requested formats have same protocol
|
||||||
info_dict['protocol'] = _protocols.pop()
|
info_dict['protocol'] = _protocols.pop()
|
||||||
directly_mergable = FFmpegFD.can_merge_formats(info_dict)
|
directly_mergable = FFmpegFD.can_merge_formats(info_dict, self.params)
|
||||||
if dl_filename is not None:
|
if dl_filename is not None:
|
||||||
self.report_file_already_downloaded(dl_filename)
|
self.report_file_already_downloaded(dl_filename)
|
||||||
elif (directly_mergable and get_suitable_downloader(
|
elif (directly_mergable and get_suitable_downloader(
|
||||||
|
@ -357,7 +357,7 @@ class FFmpegFD(ExternalFD):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def can_merge_formats(cls, info_dict, params={}):
|
def can_merge_formats(cls, info_dict, params):
|
||||||
return (
|
return (
|
||||||
info_dict.get('requested_formats')
|
info_dict.get('requested_formats')
|
||||||
and info_dict.get('protocol')
|
and info_dict.get('protocol')
|
||||||
|
Loading…
Reference in New Issue
Block a user