mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 00:25:06 +00:00
parent
51c22ef4e2
commit
07ff290dce
1 changed files with 5 additions and 2 deletions
|
@ -198,10 +198,13 @@ def validate_minmax(min_val, max_val, min_name, max_name=None):
|
||||||
validate_positive('requests sleep interval', opts.sleep_interval_requests)
|
validate_positive('requests sleep interval', opts.sleep_interval_requests)
|
||||||
validate_positive('sleep interval', opts.sleep_interval)
|
validate_positive('sleep interval', opts.sleep_interval)
|
||||||
validate_positive('max sleep interval', opts.max_sleep_interval)
|
validate_positive('max sleep interval', opts.max_sleep_interval)
|
||||||
if opts.max_sleep_interval is not None:
|
if opts.sleep_interval is None:
|
||||||
validate(
|
validate(
|
||||||
opts.sleep_interval is not None, 'min sleep interval',
|
opts.max_sleep_interval is None, 'min sleep interval',
|
||||||
msg='{name} must be specified; use --min-sleep-interval')
|
msg='{name} must be specified; use --min-sleep-interval')
|
||||||
|
elif opts.max_sleep_interval is None:
|
||||||
|
opts.max_sleep_interval = opts.sleep_interval
|
||||||
|
else:
|
||||||
validate_minmax(opts.sleep_interval, opts.max_sleep_interval, 'sleep interval')
|
validate_minmax(opts.sleep_interval, opts.max_sleep_interval, 'sleep interval')
|
||||||
|
|
||||||
if opts.wait_for_video is not None:
|
if opts.wait_for_video is not None:
|
||||||
|
|
Loading…
Reference in a new issue