From 8998861b497f692ce17c949f0c4c3530831085b1 Mon Sep 17 00:00:00 2001 From: OmarAhmadyar Date: Sat, 25 Nov 2023 00:23:46 -0800 Subject: [PATCH] [BUGFIX] file_convert output file deleted (#822) file_convert.py:modify_entry() deletes the converted output file if the output and input file names are identical. Reordered the file deletion to avoid. Thanks @OmarAhmadyar ! --- src/ytdl_sub/plugins/file_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ytdl_sub/plugins/file_convert.py b/src/ytdl_sub/plugins/file_convert.py index fa6c0c1f..f99b374d 100644 --- a/src/ytdl_sub/plugins/file_convert.py +++ b/src/ytdl_sub/plugins/file_convert.py @@ -193,9 +193,9 @@ class FileConvertPlugin(Plugin[FileConvertOptions]): "file_convert ffmpeg_post_process_args did not produce an output file" ) + FileHandler.delete(input_video_file_path) FileHandler.move(tmp_output_file, converted_video_file_path) FileHandler.delete(tmp_output_file) - FileHandler.delete(input_video_file_path) if original_ext != new_ext: entry.add_kwargs(