diff options
author | Sergey M․ <dstftw@gmail.com> | 2019-02-23 00:43:29 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-02-23 00:43:29 +0700 |
commit | 37b239b3b66ea9e2a71bae41e9da6dba8ee5554c (patch) | |
tree | 46ff24e0f6deb2a8395445df65eeb736d71e8296 | |
parent | caf48f557a8f4f904c88346bcfc462069b8745bc (diff) |
[downloader/external] Fix infinite retries for curl (closes #19303)
-rw-r--r-- | youtube_dl/downloader/external.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 958d00aac..0b88bfd94 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -121,7 +121,11 @@ class CurlFD(ExternalFD): cmd += self._valueless_option('--silent', 'noprogress') cmd += self._valueless_option('--verbose', 'verbose') cmd += self._option('--limit-rate', 'ratelimit') - cmd += self._option('--retry', 'retries') + retry = self._option('--retry', 'retries') + if len(retry) == 2: + if retry[1] in ('inf', 'infinite'): + retry[1] = '2147483647' + cmd += retry cmd += self._option('--max-filesize', 'max_filesize') cmd += self._option('--interface', 'source_address') cmd += self._option('--proxy', 'proxy') |