diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-19 20:00:31 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-19 20:00:31 +0530 |
commit | 23326151c45b632c3d5948bd018e80abb370e676 (patch) | |
tree | fb91e7386d3be2ce5fbfb83f36c14f5a7f7a429b /yt_dlp/options.py | |
parent | 9e491463521c65ca4d1d44a757e0a115f62834f5 (diff) | |
download | hypervideo-pre-23326151c45b632c3d5948bd018e80abb370e676.tar.lz hypervideo-pre-23326151c45b632c3d5948bd018e80abb370e676.tar.xz hypervideo-pre-23326151c45b632c3d5948bd018e80abb370e676.zip |
Add option --retry-sleep (#3059)
Closes #2852
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r-- | yt_dlp/options.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 1efdc8957..5c97facb7 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -829,6 +829,18 @@ def create_parser(): dest='fragment_retries', metavar='RETRIES', default=10, help='Number of retries for a fragment (default is %default), or "infinite" (DASH, hlsnative and ISM)') downloader.add_option( + '--retry-sleep', + dest='retry_sleep', metavar='[TYPE:]EXPR', default={}, type='str', + action='callback', callback=_dict_from_options_callback, + callback_kwargs={ + 'allowed_keys': 'http|fragment|file_access', + 'default_key': 'http', + }, help=( + 'An expression for the time to sleep between retries in seconds (optionally) prefixed ' + 'by the type of retry (http (default), fragment, file_access) to apply the sleep to. ' + 'EXPR can be a number, or of the forms linear=START[:END[:STEP=1]] or exp=START[:END[:BASE=2]]. ' + 'Eg: --retry-sleep linear=1::2 --retry-sleep fragment:exp=1:20')) + downloader.add_option( '--skip-unavailable-fragments', '--no-abort-on-unavailable-fragment', action='store_true', dest='skip_unavailable_fragments', default=True, help='Skip unavailable fragments for DASH, hlsnative and ISM (default) (Alias: --no-abort-on-unavailable-fragment)') |