diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-10 12:30:22 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-11 01:10:38 +0530 |
commit | 4019bf0525995fe9426ad8e78f366538cc804e62 (patch) | |
tree | b844994924ef310149456bfdcf69e12a8377a2c5 /yt_dlp/postprocessor/modify_chapters.py | |
parent | 65ea4cba293d283f1d03b48208fb07e7e2ae35e2 (diff) | |
download | hypervideo-pre-4019bf0525995fe9426ad8e78f366538cc804e62.tar.lz hypervideo-pre-4019bf0525995fe9426ad8e78f366538cc804e62.tar.xz hypervideo-pre-4019bf0525995fe9426ad8e78f366538cc804e62.zip |
[ModifyChapters] Modify duration in infodict
Diffstat (limited to 'yt_dlp/postprocessor/modify_chapters.py')
-rw-r--r-- | yt_dlp/postprocessor/modify_chapters.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/postprocessor/modify_chapters.py b/yt_dlp/postprocessor/modify_chapters.py index de3505e11..6959222c8 100644 --- a/yt_dlp/postprocessor/modify_chapters.py +++ b/yt_dlp/postprocessor/modify_chapters.py @@ -38,8 +38,9 @@ class ModifyChaptersPP(FFmpegPostProcessor): if not cuts: return [], info - if self._duration_mismatch(real_duration, info.get('duration'), 1): - if not self._duration_mismatch(real_duration, info['chapters'][-1]['end_time']): + original_duration, info['duration'] = info.get('duration'), info['chapters'][-1]['end_time'] + if self._duration_mismatch(real_duration, original_duration, 1): + if not self._duration_mismatch(real_duration, info['duration']): self.to_screen(f'Skipping {self.pp_key()} since the video appears to be already cut') return [], info if not info.get('__real_download'): |