diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-05-24 23:29:30 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-05-24 23:29:30 +0530 |
commit | 46f1370e9af6f8af8762f67e27e5acb8f0c48a47 (patch) | |
tree | 3248685f68fdb473ec7e4fdab9447a90e0d82cf6 /yt_dlp/downloader/common.py | |
parent | 69a40e4a7f6caa5662527ebd2f3c4e8aa02857a2 (diff) | |
download | hypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.tar.lz hypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.tar.xz hypervideo-pre-46f1370e9af6f8af8762f67e27e5acb8f0c48a47.zip |
[devscripts/cli_to_api] Add script
Diffstat (limited to 'yt_dlp/downloader/common.py')
-rw-r--r-- | yt_dlp/downloader/common.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index 077b29b41..8f9bc05d6 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -51,8 +51,9 @@ class FileDownloader: ratelimit: Download speed limit, in bytes/sec. continuedl: Attempt to continue downloads if possible throttledratelimit: Assume the download is being throttled below this speed (bytes/sec) - retries: Number of times to retry for HTTP error 5xx - file_access_retries: Number of times to retry on file access error + retries: Number of times to retry for expected network errors. + Default is 0 for API, but 10 for CLI + file_access_retries: Number of times to retry on file access error (default: 3) buffersize: Size of download buffer in bytes. noresizebuffer: Do not automatically resize the download buffer. continuedl: Try to continue downloads if possible. @@ -225,7 +226,7 @@ class FileDownloader: sleep_func=fd.params.get('retry_sleep_functions', {}).get('file_access')) def wrapper(self, func, *args, **kwargs): - for retry in RetryManager(self.params.get('file_access_retries'), error_callback, fd=self): + for retry in RetryManager(self.params.get('file_access_retries', 3), error_callback, fd=self): try: return func(self, *args, **kwargs) except OSError as err: |