Skip to content

Commit

Permalink
fix incorrect subtitle add bug
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbach committed Feb 2, 2024
1 parent 1957c0f commit fc1ff6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion legen.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@
pass # translation not requested
elif args.translate == audio_language:
print("Translation is unnecessary because input and output language are the same. Skipping.")
elif (args.disable_hardsubs or file_utils.file_is_valid(hardsub_video_path)) and (args.disable_srt or file_utils.file_is_valid(subtitle_translated_path)) and not args.overwrite:
elif (args.disable_hardsubs or file_utils.file_is_valid(hardsub_video_path)) and (args.disable_srt or (file_utils.file_is_valid(subtitle_translated_path) and file_utils.file_is_valid(subtitle_transcribed_path) and file_utils.file_is_valid(subtitle_translated_path))) and not args.overwrite:
print("Translation is unnecessary. Skipping.")
subtitles_path.insert(0, subtitle_translated_path)
elif file_utils.file_is_valid(subtitle_translated_path):
print("Translated file found. Skipping translation.")
subtitles_path.insert(0, subtitle_translated_path)
Expand Down

0 comments on commit fc1ff6e

Please sign in to comment.