summaryrefslogtreecommitdiffhomepage
path: root/libs/subzero
diff options
context:
space:
mode:
authorVitiko <[email protected]>2021-04-15 07:47:30 -0400
committerGitHub <[email protected]>2021-04-15 07:47:30 -0400
commit56958488b6f90c04d35fb80872dfb88ae62e9e91 (patch)
tree9bd48478baf2a4266e0bf1e2bf09c6555ee5653a /libs/subzero
parenta20e570de1dcccc9c1be76accd37bb4906b22d66 (diff)
downloadbazarr-56958488b6f90c04d35fb80872dfb88ae62e9e91.tar.gz
bazarr-56958488b6f90c04d35fb80872dfb88ae62e9e91.zip
Fixed big loop from subzero modification module
Co-authored-by: vitiko98
Diffstat (limited to 'libs/subzero')
-rw-r--r--libs/subzero/modification/main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/subzero/modification/main.py b/libs/subzero/modification/main.py
index da41e2e7d..b6131892e 100644
--- a/libs/subzero/modification/main.py
+++ b/libs/subzero/modification/main.py
@@ -275,8 +275,13 @@ class SubtitleModifications(object):
logger.debug(u"Skipping empty line: %s", index)
continue
+ line_split = t.split(r"\N")
+ if len(line_split) > 3: # Badly parsed subtitle
+ logger.error("Skipping %d lines for %s mod", len(line_split), mods)
+ continue
+
skip_entry = False
- for line in t.split(r"\N"):
+ for line in line_split:
# don't bother the mods with surrounding tags
old_line = line
line = line.strip()