summaryrefslogtreecommitdiffhomepage
path: root/libs/subzero
diff options
context:
space:
mode:
authorJakob Koschel <[email protected]>2023-02-22 18:28:02 +0100
committerGitHub <[email protected]>2023-02-22 12:28:02 -0500
commit68a0d787256f73982da0bc34020d102a9d69ed0f (patch)
tree823af4211b599de45dffcef0be5fcec07af1a2b3 /libs/subzero
parent88c9d67cf174a08dae9ea3e96cd1c3e070fb318a (diff)
downloadbazarr-68a0d787256f73982da0bc34020d102a9d69ed0f.tar.gz
bazarr-68a0d787256f73982da0bc34020d102a9d69ed0f.zip
Fixed uppercase detection mod with multiline HI
Diffstat (limited to 'libs/subzero')
-rw-r--r--libs/subzero/modification/main.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/libs/subzero/modification/main.py b/libs/subzero/modification/main.py
index 13bf22483..b0faddd4e 100644
--- a/libs/subzero/modification/main.py
+++ b/libs/subzero/modification/main.py
@@ -184,22 +184,22 @@ class SubtitleModifications(object):
entries_used = 0
for entry in self.f:
entry_used = False
- for sub in entry.text.strip().split(r"\N"):
- # skip HI bracket entries, those might actually be lowercase
- sub = sub.strip()
- for processor in registry.mods["remove_HI"].processors[:4]:
- sub = processor.process(sub)
-
- if sub.strip():
- # 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
- else:
- # skip full entry
- break
+ sub = entry.text
+ # skip HI bracket entries, those might actually be lowercase
+ sub = sub.strip()
+ for processor in registry.mods["remove_HI"].processors[:4]:
+ sub = processor.process(sub)
+
+ if sub.strip():
+ # 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
+ else:
+ # skip full entry
+ break
if entry_used:
entries_used += 1