Fix end time of clips (#5255)

Closes #5256
Authored by: cruel-efficiency
pull/5283/head
cruel-efficiency 2022-10-18 05:51:43 -07:00 zatwierdzone przez GitHub
rodzic 217753f4aa
commit 2576d53a31
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -2720,7 +2720,8 @@ class YoutubeDL:
if chapter or offset:
new_info.update({
'section_start': offset + chapter.get('start_time', 0),
'section_end': end_time if end_time < offset + duration else None,
# duration may not be accurate. So allow deviations <1sec
'section_end': end_time if end_time <= offset + duration + 1 else None,
'section_title': chapter.get('title'),
'section_number': chapter.get('index'),
})