1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-26 17:41:46 +00:00

Integrate the retry count into the wait-for-video option.

This commit is contained in:
Paul Storkman
2024-12-29 21:10:46 +01:00
parent de4e709220
commit 1bd564ddab
3 changed files with 38 additions and 25 deletions

View File

@@ -436,18 +436,16 @@ def create_parser():
help='Download livestreams from the current time (default)')
general.add_option(
'--wait-for-video',
dest='wait_for_video', metavar='MIN[-MAX]', default=None,
dest='wait_for_video', metavar='MIN[-MAX][:RETRIES]', default=None,
help=(
'Wait for scheduled streams to become available. '
'Pass the minimum number of seconds (or range) to wait between retries'))
'Pass the minimum number of seconds (or range) to wait between retries. '
'RETRIES is the maximum number of additional attempts if the video '
'is still unavailable after waiting (default is infinite)'))
general.add_option(
'--no-wait-for-video',
dest='wait_for_video', action='store_const', const=None,
help='Do not wait for scheduled streams (default)')
general.add_option(
'--wait-retries',
dest='wait_retries', metavar='RETRIES', default='infinite',
help='Number of retries while waiting for scheduled streams to become available (default is %default). --wait-for-video must also be set')
general.add_option(
'--mark-watched',
action='store_true', dest='mark_watched', default=False,