]> jfr.im git - yt-dlp.git/commitdiff
Fix `section_end` of clips
authorpukkandan <redacted>
Fri, 24 Jun 2022 18:37:49 +0000 (00:07 +0530)
committerpukkandan <redacted>
Fri, 24 Jun 2022 18:38:49 +0000 (00:08 +0530)
Closes #4165

yt_dlp/YoutubeDL.py

index 29a4e0a72d308b5d89d6f2d24d3b47c5c207f348..fc0689882caec6c820c097a6c846b6544f4f0fde 100644 (file)
@@ -2619,7 +2619,7 @@ def to_screen(*msg):
                 if chapter or offset:
                     new_info.update({
                         'section_start': offset + chapter.get('start_time', 0),
-                        'section_end': offset + min(chapter.get('end_time', 0), duration),
+                        'section_end': offset + min(chapter.get('end_time', duration), duration),
                         'section_title': chapter.get('title'),
                         'section_number': chapter.get('index'),
                     })