1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 01:27:07 +00:00

Improved the fix uppercase mod to better deal with non-alphabetical characters

This commit is contained in:
Jakob Koschel 2022-08-29 21:34:55 +02:00 committed by GitHub
parent 34d6185346
commit 26082780d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,7 +191,9 @@ class SubtitleModifications(object):
sub = processor.process(sub) sub = processor.process(sub)
if sub.strip(): 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 return False
entry_used = True entry_used = True