Add ytopts

These are all optimizations:
- `writethumbnail`: for EmbedThumbnail to use
- `check_formats`: to save requests
- `overwrites`: to keep the first version of the video
- sleep intervals to slow down our tasks only for video downloads
This commit is contained in:
tcely 2025-01-29 21:13:17 -05:00 committed by GitHub
parent 152f88e7e7
commit 3822c1a4f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -243,6 +243,12 @@ def download_media(url, media_format, extension, output_file, info_json,
'writesubtitles': write_subtitles,
'writeautomaticsub': auto_subtitles,
'subtitleslangs': sub_langs.split(','),
'writethumbnail': True,
'check_formats': False,
'overwrites': None,
'sleep_interval': 30,
'max_sleep_interval': 600,
'sleep_interval_requests': 30,
}
opts = get_yt_opts()
ytopts['paths'] = opts.get('paths', {})