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

subtitle: for some reason sequence number is a hash or uuid sometimes.

This commit is contained in:
Johan Andersson 2023-11-29 00:04:09 +01:00
parent 471e4d6063
commit b01124a4ab

View File

@ -353,7 +353,7 @@ def _wrstsegments(entries: list, convert=False) -> str:
time = 0 time = 0
subs = [] subs = []
for cont in entries: for cont in entries:
cont = re.sub(r"\n\n\d+\n", "\n", cont) # remove sequence numbers cont = re.sub(r"\n\n[-0-9a-f\d]+\n", "\n", cont) # remove sequence numbers
text = cont.split("\n") text = cont.split("\n")
for t in text: # is in text[1] for tv4play, but this should be more future proof for t in text: # is in text[1] for tv4play, but this should be more future proof
if "X-TIMESTAMP-MAP=MPEGTS" in t: if "X-TIMESTAMP-MAP=MPEGTS" in t: