mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-24 07:40:10 +00:00
[ie/youtube] Handle required preroll waiting period (#14081)
Authored by: bashonly
This commit is contained in:
@@ -4044,6 +4044,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
if needs_live_processing:
|
||||
self._prepare_live_from_start_formats(
|
||||
formats, video_id, live_start_time, url, webpage_url, smuggled_data, live_status == 'is_live')
|
||||
elif live_status != 'is_live':
|
||||
# Handle preroll waiting period
|
||||
preroll_sleep = int_or_none(self._configuration_arg('preroll_sleep', [None])[0], default=6)
|
||||
available_at = int(time.time()) + preroll_sleep
|
||||
for fmt in formats:
|
||||
fmt['available_at'] = available_at
|
||||
|
||||
formats.extend(self._extract_storyboard(player_responses, duration))
|
||||
|
||||
|
Reference in New Issue
Block a user