1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-02-24 17:36:09 +00:00

Merge branch 'yt-dlp:master' into pr/live-sections

This commit is contained in:
bashonly
2025-01-30 14:26:39 -06:00
61 changed files with 2329 additions and 1926 deletions

View File

@@ -262,9 +262,11 @@ def validate_options(opts):
elif value in ('inf', 'infinite'):
return float('inf')
try:
return int(value)
int_value = int(value)
except (TypeError, ValueError):
validate(False, f'{name} retry count', value)
validate_positive(f'{name} retry count', int_value)
return int_value
opts.retries = parse_retries('download', opts.retries)
opts.fragment_retries = parse_retries('fragment', opts.fragment_retries)