[downloader] Fix bug for ffmpeg/httpie

Caused by: 7f7de7f94d
This commit is contained in:
pukkandan 2021-03-05 04:22:37 +05:30
parent 36147a63e3
commit 9e631877f8
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -282,8 +282,8 @@ def _make_cmd(self, tmpfilename, info_dict):
class HttpieFD(ExternalFD): class HttpieFD(ExternalFD):
@classmethod @classmethod
def available(cls): def available(cls, path=None):
return check_executable('http', ['--version']) return check_executable(path or 'http', ['--version'])
def _make_cmd(self, tmpfilename, info_dict): def _make_cmd(self, tmpfilename, info_dict):
cmd = ['http', '--download', '--output', tmpfilename, info_dict['url']] cmd = ['http', '--download', '--output', tmpfilename, info_dict['url']]
@ -298,7 +298,7 @@ class FFmpegFD(ExternalFD):
SUPPORTED_PROTOCOLS = ('http', 'https', 'ftp', 'ftps', 'm3u8', 'rtsp', 'rtmp', 'mms') SUPPORTED_PROTOCOLS = ('http', 'https', 'ftp', 'ftps', 'm3u8', 'rtsp', 'rtmp', 'mms')
@classmethod @classmethod
def available(cls): def available(cls, path=None): # path is ignored for ffmpeg
return FFmpegPostProcessor().available return FFmpegPostProcessor().available
def _call_downloader(self, tmpfilename, info_dict): def _call_downloader(self, tmpfilename, info_dict):