Skip to content

Commit

Permalink
Silence SubtitleEdit when stripping SDH
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed Mar 16, 2023
1 parent c778a89 commit 6e888a0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions devine/core/tracks/subtitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,16 @@ def strip_hearing_impaired(self) -> None:

executable = get_binary_path("SubtitleEdit")
if executable:
subprocess.run([
executable,
"/Convert", self.path, "srt",
"/overwrite",
"/RemoveTextForHI"
], check=True)
subprocess.run(
[
executable,
"/Convert", self.path, "srt",
"/overwrite",
"/RemoveTextForHI"
],
check=True,
stdout=subprocess.DEVNULL
)
# Remove UTF-8 Byte Order Marks
self.path.write_text(
self.path.read_text(encoding="utf-8-sig"),
Expand Down

0 comments on commit 6e888a0

Please sign in to comment.