1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-22 16:08:58 +00:00

Support for epoch timestamps

This commit is contained in:
Elyse
2023-05-06 23:05:38 -06:00
parent 128d30492b
commit 7f93eb7a28
2 changed files with 19 additions and 3 deletions

View File

@@ -2765,8 +2765,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
begin_index = 0
download_start_time = ctx.get('start') or time.time()
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']
section_start = ctx.get('section_start') or 0
section_end = ctx.get('section_end') or math.inf
self.write_debug(f'Selected section: {section_start} -> {section_end}')