diff options
author | remitamine <remitamine@gmail.com> | 2016-03-13 14:53:17 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2016-03-13 15:18:51 +0100 |
commit | 2cb99ebbd0284f0de4bafd03179653bb9599b080 (patch) | |
tree | 7925c7abb3a2bdff7a86f82b0e14bf9b5de97ba0 /youtube_dl/downloader/external.py | |
parent | 91ee320bfaa279571b27bf44730c8677ff2b3980 (diff) |
[downloader/external] add can_download mathod for checking downloader availibilty and support
Diffstat (limited to 'youtube_dl/downloader/external.py')
-rw-r--r-- | youtube_dl/downloader/external.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index daedf66de..fe2a0198c 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -59,6 +59,10 @@ class ExternalFD(FileDownloader): def supports(cls, info_dict): return info_dict['protocol'] in ('http', 'https', 'ftp', 'ftps') + @classmethod + def can_download(cls, info_dict): + return cls.available() and cls.supports(info_dict) + def _option(self, command_option, param): return cli_option(self.params, command_option, param) |