Skip to content

Commit

Permalink
Update subgen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
McCloudS authored Feb 6, 2024
1 parent b9c9264 commit 0dc9b09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subgen/subgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ def gen_subtitles(file_path: str, transcribe_or_translate_str: str, front=True)
except Exception as e:
print(f"Error processing or transcribing {file_path}: {e}")
finally:
files_to_transcribe.remove(file_path)
if file_path in files_to_transcribe:
files_to_transcribe.remove(file_path)
delete_model()

def get_file_name_without_extension(file_path):
Expand Down

0 comments on commit 0dc9b09

Please sign in to comment.