X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fdownloader%2F__init__.py;h=817591d97e88606b966b7055026f691faab840dc;hb=53a7e3d2879feac7b1b6f714692581057b9b5f6b;hp=0b65aa3e2ffa261e7bedd082661c21f1aedc0c07;hpb=be24916a7f6af9540076a6bc39bc78a71d6264bb;p=youtube-dl diff --git a/youtube_dl/downloader/__init__.py b/youtube_dl/downloader/__init__.py index 0b65aa3e2..817591d97 100644 --- a/youtube_dl/downloader/__init__.py +++ b/youtube_dl/downloader/__init__.py @@ -32,8 +32,8 @@ 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): - return FFmpegFD + # 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') if external_downloader is not None: @@ -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)