[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 !
This commit is contained in:
OmarAhmadyar 2023-11-25 00:23:46 -08:00 committed by GitHub
parent 544af2207b
commit 8998861b49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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