From 89284c9d4681225d25695a2e85f6a79459bc5e41 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sat, 29 May 2021 23:57:14 +0200 Subject: [PATCH] subtitle: wrstegment files from viaplay is utf8 encoded fixes: #1390 --- lib/svtplay_dl/subtitle/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/svtplay_dl/subtitle/__init__.py b/lib/svtplay_dl/subtitle/__init__.py index b377980..6bebcce 100644 --- a/lib/svtplay_dl/subtitle/__init__.py +++ b/lib/svtplay_dl/subtitle/__init__.py @@ -291,6 +291,8 @@ class subtitle: cont.encoding = "utf-8" if "mtgx" in self.url: cont.encoding = "utf-8" + if "viaplay" in self.url: + cont.encoding = "utf-8" text = cont.text.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: