From 6e888a095ee287f19742eb202de76c32b2b85565 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Thu, 16 Mar 2023 20:49:23 +0000 Subject: [PATCH] Silence SubtitleEdit when stripping SDH --- devine/core/tracks/subtitle.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/devine/core/tracks/subtitle.py b/devine/core/tracks/subtitle.py index 040b1120..70dee68d 100644 --- a/devine/core/tracks/subtitle.py +++ b/devine/core/tracks/subtitle.py @@ -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"),