From 4cb836b80b37f63f8da6b2050d47554be64ea759 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:29:17 -0700 Subject: [PATCH] Update subgen.py Fixed removing failed items from the queue. --- subgen/subgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subgen/subgen.py b/subgen/subgen.py index 490b3fb..a15d1d1 100644 --- a/subgen/subgen.py +++ b/subgen/subgen.py @@ -293,13 +293,13 @@ def gen_subtitles(file_path: str, transcribe_or_translate_str: str, front=True) elapsed_time = time.time() - start_time minutes, seconds = divmod(int(elapsed_time), 60) print(f"Transcription of {os.path.basename(file_path)} is completed, it took {minutes} minutes and {seconds} seconds to complete.") - files_to_transcribe.remove(file_path) else: print(f"File {os.path.basename(file_path)} is already in the transcription list. Skipping.") except Exception as e: print(f"Error processing or transcribing {file_path}: {e}") finally: + files_to_transcribe.remove(file_path) delete_model() def has_subtitle_language(video_file, target_language):