aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/modify_chapters.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
committerJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
commitc7a54bcfbd27dde89c6267b42da7de8ea5625be1 (patch)
tree671b2b7ffe3f976952836dbfe6ee53bf33971e3a /yt_dlp/postprocessor/modify_chapters.py
parentb6d1ccad21d790c38605be2966ad17e92f1186d7 (diff)
parented66a17ef0b18159dda901f0122520c25ea95d6b (diff)
downloadhypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.lz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.xz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.zip
updated from upstream | 18/02/2022 at 16:58
Diffstat (limited to 'yt_dlp/postprocessor/modify_chapters.py')
-rw-r--r--yt_dlp/postprocessor/modify_chapters.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/postprocessor/modify_chapters.py b/yt_dlp/postprocessor/modify_chapters.py
index 435a144e2..22506bc21 100644
--- a/yt_dlp/postprocessor/modify_chapters.py
+++ b/yt_dlp/postprocessor/modify_chapters.py
@@ -68,9 +68,11 @@ class ModifyChaptersPP(FFmpegPostProcessor):
# Renaming should only happen after all files are processed
files_to_remove = []
for in_file, out_file in in_out_files:
+ mtime = os.stat(in_file).st_mtime
uncut_file = prepend_extension(in_file, 'uncut')
os.replace(in_file, uncut_file)
os.replace(out_file, in_file)
+ self.try_utime(in_file, mtime, mtime)
files_to_remove.append(uncut_file)
return files_to_remove, info