From da41f820f554800752374dc0fcbb01dcad8a4494 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:17:51 -0700 Subject: [PATCH] Update filtering to remove "Calling on..." --- subgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subgen.py b/subgen.py index 7e46480..1ecc96d 100644 --- a/subgen.py +++ b/subgen.py @@ -109,7 +109,7 @@ def transcription_worker(): for _ in range(concurrent_transcriptions): threading.Thread(target=transcription_worker, daemon=True).start() -# Define a filter class +# Define a filter class to hide common logging we don't want to see class MultiplePatternsFilter(logging.Filter): def filter(self, record): # Define the patterns to search for @@ -127,6 +127,7 @@ class MultiplePatternsFilter(logging.Filter): "misdetection possible", "srt was added", "doesn't have any audio to transcribe", + "Calling on_" ] # Return False if any of the patterns are found, True otherwise return not any(pattern in record.getMessage() for pattern in patterns)