1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[Sponsorblock] minor fixes (#2793)

* preserve mtime - Closes #2769
* keep concat spec on failure

Authored by: nihil-admirari
This commit is contained in:
Nil Admirari
2022-02-17 17:10:34 +00:00
committed by GitHub
parent ac184ab742
commit ae419aa94f
2 changed files with 6 additions and 6 deletions

View File

@ -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