Fix section_end of clips

Closes #4165
This commit is contained in:
pukkandan 2022-06-25 00:07:49 +05:30
parent 379a4f161d
commit bc40160883
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -2619,7 +2619,7 @@ class YoutubeDL:
if chapter or offset: if chapter or offset:
new_info.update({ new_info.update({
'section_start': offset + chapter.get('start_time', 0), '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_title': chapter.get('title'),
'section_number': chapter.get('index'), 'section_number': chapter.get('index'),
}) })