Merge pull request #911 from tcely/patch-10

Restrict delays to a range between 10 seconds and 20 minutes
This commit is contained in:
meeb 2025-04-08 14:35:50 +10:00 committed by GitHub
commit 62fe49985a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -316,8 +316,8 @@ def download_media(
'check_formats': None, 'check_formats': None,
'overwrites': None, 'overwrites': None,
'skip_unavailable_fragments': False, 'skip_unavailable_fragments': False,
'sleep_interval': 10 + int(settings.DOWNLOAD_MEDIA_DELAY / 20), 'sleep_interval': 10,
'max_sleep_interval': settings.DOWNLOAD_MEDIA_DELAY, 'max_sleep_interval': min(20*60, max(60, settings.DOWNLOAD_MEDIA_DELAY)),
'sleep_interval_requests': 1 + (2 * settings.BACKGROUND_TASK_ASYNC_THREADS), 'sleep_interval_requests': 1 + (2 * settings.BACKGROUND_TASK_ASYNC_THREADS),
'paths': opts.get('paths', dict()), 'paths': opts.get('paths', dict()),
'postprocessor_args': opts.get('postprocessor_args', dict()), 'postprocessor_args': opts.get('postprocessor_args', dict()),