1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00:00

[EmbedSubtitles] Slightly relax duration check

and related cleanup
Closes #1385
This commit is contained in:
pukkandan
2021-11-27 19:19:02 +05:30
parent e04b003e64
commit 5ce1d13eba
2 changed files with 23 additions and 23 deletions

View File

@ -38,7 +38,7 @@ class ModifyChaptersPP(FFmpegPostProcessor):
if not chapters and not sponsor_chapters:
return [], info
real_duration = self._get_real_video_duration(info)
real_duration = self._get_real_video_duration(info['filepath'])
if not chapters:
chapters = [{'start_time': 0, 'end_time': real_duration, 'title': info['title']}]
@ -72,7 +72,6 @@ class ModifyChaptersPP(FFmpegPostProcessor):
os.replace(out_file, in_file)
files_to_remove.append(uncut_file)
info['_real_duration'] = info['chapters'][-1]['end_time']
return files_to_remove, info
def _mark_chapters_to_remove(self, chapters, sponsor_chapters):