X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fdownloader%2F__init__.py;h=817591d97e88606b966b7055026f691faab840dc;hb=4a69fa04e0074a3d5938ffb03decff9cc33f5d3d;hp=19471a25073dc49fb3acaa7bf46a0cb5d47f0ea4;hpb=da1973a0383ddc8125702e74a88d3a35bbfcf06d;p=youtube-dl.git diff --git a/youtube_dl/downloader/__init__.py b/youtube_dl/downloader/__init__.py index 19471a250..817591d97 100644 --- a/youtube_dl/downloader/__init__.py +++ b/youtube_dl/downloader/__init__.py @@ -32,7 +32,7 @@ def get_suitable_downloader(info_dict, params={}): protocol = determine_protocol(info_dict) info_dict['protocol'] = protocol - # if (info_dict.get('start_time') or info_dict.get('end_time')) and FFmpegFD.can_download(info_dict): + # if (info_dict.get('start_time') or info_dict.get('end_time')) and not info_dict.get('requested_formats') and FFmpegFD.can_download(info_dict): # return FFmpegFD external_downloader = params.get('external_downloader') @@ -41,9 +41,12 @@ def get_suitable_downloader(info_dict, params={}): if ed.can_download(info_dict): return ed - if protocol == 'm3u8' and params.get('hls_prefer_native'): + if protocol == 'm3u8' and params.get('hls_prefer_native') is True: return HlsFD + if protocol == 'm3u8_native' and params.get('hls_prefer_native') is False: + return FFmpegFD + return PROTOCOL_MAP.get(protocol, HttpFD)