Skip to content

Commit

Permalink
remove existing sub files in output_folder
Browse files Browse the repository at this point in the history
  • Loading branch information
cbusillo committed Jun 21, 2024
1 parent fe8aa67 commit 7fda95f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bd_to_avp/modules/sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def extract_subtitle_to_srt(mkv_path: Path, output_path: Path) -> None:
spinner_thread = threading.Thread(target=spinner.start)
spinner_thread.start()

for subtitle_path in output_path.glob("*.srt"):
subtitle_path.unlink()

mkv_file = Mkv(mkv_path.as_posix())
os.environ["TESSDATA_PREFIX"] = tessdata_path.as_posix()

Expand Down

0 comments on commit 7fda95f

Please sign in to comment.