1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

subtitle: they have css align after the timecode

This commit is contained in:
Johan Andersson 2023-11-29 00:05:08 +01:00
parent b01124a4ab
commit d713d33e67
2 changed files with 5 additions and 3 deletions

View File

@ -479,7 +479,9 @@ def tt_text(node, data):
def strdate(datestring):
match = re.search(r"^((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?) --> ((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?)$", datestring)
match = re.search(r"^((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?) --> ((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?)[ ]*", datestring)
if match and match.group(5) is None and match.group(6) is not None:
return None
return match

View File

@ -164,7 +164,7 @@ class streamSubtile(unittest.TestCase):
subtitle(config, "wrst", "http://example.com", subfix="no"),
]
subs = subtitle_filter(test_subs)
assert len(subs) == 4
assert len(subs) == 3
def test_subtitleFilter3(self):
config = setup_defaults()
@ -200,4 +200,4 @@ class streamSubtile(unittest.TestCase):
subtitle(config, "wrst", "http://example.com", subfix="no"),
]
subs = subtitle_filter(test_subs)
assert len(subs) == 3
assert len(subs) == 2