From 26082780d579bd1ffdca0e8c4bef393966db982c Mon Sep 17 00:00:00 2001 From: Jakob Koschel Date: Mon, 29 Aug 2022 21:34:55 +0200 Subject: [PATCH] Improved the fix uppercase mod to better deal with non-alphabetical characters --- libs/subzero/modification/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/subzero/modification/main.py b/libs/subzero/modification/main.py index b6131892e..13bf22483 100644 --- a/libs/subzero/modification/main.py +++ b/libs/subzero/modification/main.py @@ -191,7 +191,9 @@ class SubtitleModifications(object): sub = processor.process(sub) if sub.strip(): - if not sub.isupper(): + # only consider alphabetic characters to determine if uppercase + alpha_sub = ''.join([i for i in sub if i.isalpha()]) + if alpha_sub and not alpha_sub.isupper(): return False entry_used = True