summaryrefslogtreecommitdiffhomepage
path: root/libs/subzero
diff options
context:
space:
mode:
authorJakob Koschel <[email protected]>2022-08-29 21:34:55 +0200
committerGitHub <[email protected]>2022-08-29 15:34:55 -0400
commit26082780d579bd1ffdca0e8c4bef393966db982c (patch)
tree369d0e04ed9f1ea21cb36a864c0298c2f2520caf /libs/subzero
parent34d61853469415d2ba5bfe242336f15b6a064ad5 (diff)
downloadbazarr-26082780d579bd1ffdca0e8c4bef393966db982c.tar.gz
bazarr-26082780d579bd1ffdca0e8c4bef393966db982c.zip
Improved the fix uppercase mod to better deal with non-alphabetical characters
Diffstat (limited to 'libs/subzero')
-rw-r--r--libs/subzero/modification/main.py4
1 files changed, 3 insertions, 1 deletions
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