A feature-rich command-line audio/video downloader
[Sponsorblock] minor fixes (#2793)
Nil Admirariae419aa94fc1
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.pyindex 42e9d12a75..05eeee2d74 100644--- a/yt_dlp/postprocessor/ffmpeg.py+++ b/yt_dlp/postprocessor/ffmpeg.py@@ -384,12 +384,10 @@ class FFmpegPostProcessor(PostProcessor):out_flags = list(self.stream_copy_opts(ext=determine_ext(out_file)))- try:- self.real_run_ffmpeg(- [(concat_file, ['-hide_banner', '-nostdin', '-f', 'concat', '-safe', '0'])],- [(out_file, out_flags)])- finally:- os.remove(concat_file)+ self.real_run_ffmpeg(+ [(concat_file, ['-hide_banner', '-nostdin', '-f', 'concat', '-safe', '0'])],+ [(out_file, out_flags)])+ os.remove(concat_file)@classmethoddef _concat_spec(cls, in_files, concat_opts=None):diff --git a/yt_dlp/postprocessor/modify_chapters.py b/yt_dlp/postprocessor/modify_chapters.pyindex 435a144e23..22506bc21d 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 processedfiles_to_remove = []for in_file, out_file in in_out_files:+ mtime = os.stat(in_file).st_mtimeuncut_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