mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-16 04:58:56 +00:00
Support negative durations
This commit is contained in:
@@ -2764,8 +2764,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
begin_index = 0
|
||||
download_start_time = ctx.get('start') or time.time()
|
||||
section_start = ctx.get('section_start') or 0
|
||||
section_end = ctx.get('section_end') or math.inf
|
||||
|
||||
section_start = 0 if ctx.get('section_start') is None else download_start_time + ctx['section_start']
|
||||
section_end = math.inf if ctx.get('section_end') is None else download_start_time + ctx['section_end']
|
||||
|
||||
lack_early_segments = download_start_time - (live_start_time or download_start_time) > MAX_DURATION
|
||||
if lack_early_segments:
|
||||
|
||||
Reference in New Issue
Block a user