1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

subtitle: wrstegment files from viaplay is utf8 encoded

fixes: #1390
This commit is contained in:
Johan Andersson 2021-05-29 23:57:14 +02:00
parent 45fceaaa8f
commit 89284c9d46

View File

@ -291,6 +291,8 @@ class subtitle:
cont.encoding = "utf-8" cont.encoding = "utf-8"
if "mtgx" in self.url: if "mtgx" in self.url:
cont.encoding = "utf-8" cont.encoding = "utf-8"
if "viaplay" in self.url:
cont.encoding = "utf-8"
text = cont.text.split("\n") text = cont.text.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: