From fd0ad54ecb2f5773436ddb1e8adc915490e46767 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 10 Jan 2023 23:05:28 +0100 Subject: [PATCH] wrstsegments: remove sequence number --- lib/svtplay_dl/subtitle/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/svtplay_dl/subtitle/__init__.py b/lib/svtplay_dl/subtitle/__init__.py index 13317f2..e99040e 100644 --- a/lib/svtplay_dl/subtitle/__init__.py +++ b/lib/svtplay_dl/subtitle/__init__.py @@ -334,6 +334,7 @@ def _wrstsegments(entries: list, convert=False) -> str: time = 0 subs = [] for cont in entries: + cont = re.sub(r"\n\n\d+\n", "\n", cont) # remove sequence numbers text = cont.split("\n") for t in text: # is in text[1] for tv4play, but this should be more future proof if "X-TIMESTAMP-MAP=MPEGTS" in t: