diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-27 19:19:02 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-27 19:21:47 +0530 |
commit | 5ce1d13eba66eae69ff42be1ddd83ae1fc1a1c59 (patch) | |
tree | d9662a8bb098a2c5c4df36893b853cf28b61298d /yt_dlp/postprocessor/modify_chapters.py | |
parent | e04b003e6469db220131812b4894ac2a1d5ee083 (diff) | |
download | hypervideo-pre-5ce1d13eba66eae69ff42be1ddd83ae1fc1a1c59.tar.lz hypervideo-pre-5ce1d13eba66eae69ff42be1ddd83ae1fc1a1c59.tar.xz hypervideo-pre-5ce1d13eba66eae69ff42be1ddd83ae1fc1a1c59.zip |
[EmbedSubtitles] Slightly relax duration check
and related cleanup
Closes #1385
Diffstat (limited to 'yt_dlp/postprocessor/modify_chapters.py')
-rw-r--r-- | yt_dlp/postprocessor/modify_chapters.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/yt_dlp/postprocessor/modify_chapters.py b/yt_dlp/postprocessor/modify_chapters.py index dca876200..0728bdcf5 100644 --- a/yt_dlp/postprocessor/modify_chapters.py +++ b/yt_dlp/postprocessor/modify_chapters.py @@ -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): |