Silence SubtitleEdit when stripping SDH

This commit is contained in:
rlaphoenix 2023-03-16 20:49:23 +00:00
parent c778a890cf
commit 6e888a095e
1 changed files with 10 additions and 6 deletions

View File

@ -356,12 +356,16 @@ class Subtitle(Track):
executable = get_binary_path("SubtitleEdit") executable = get_binary_path("SubtitleEdit")
if executable: if executable:
subprocess.run([ subprocess.run(
executable, [
"/Convert", self.path, "srt", executable,
"/overwrite", "/Convert", self.path, "srt",
"/RemoveTextForHI" "/overwrite",
], check=True) "/RemoveTextForHI"
],
check=True,
stdout=subprocess.DEVNULL
)
# Remove UTF-8 Byte Order Marks # Remove UTF-8 Byte Order Marks
self.path.write_text( self.path.write_text(
self.path.read_text(encoding="utf-8-sig"), self.path.read_text(encoding="utf-8-sig"),