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

viaplay: check if its vtt or sami

This commit is contained in:
Johan Andersson 2016-12-05 19:57:57 +01:00
parent ec0f2a4feb
commit 3173beef4a

View File

@ -142,9 +142,17 @@ class Viaplay(Service, OpenGraphThumbMixin):
self.options.output = title
if dataj["sami_path"]:
yield subtitle(copy.copy(self.options), "sami", dataj["sami_path"])
if dataj["sami_path"].endswith("vtt"):
subtype = "wrst"
else:
subtype = "sami"
yield subtitle(copy.copy(self.options), subtype, dataj["sami_path"])
if dataj["subtitles_for_hearing_impaired"]:
yield subtitle(copy.copy(self.options), "sami", dataj["subtitles_for_hearing_impaired"])
if dataj["subtitles_for_hearing_impaired"].endswith("vtt"):
subtype = "wrst"
else:
subtype = "sami"
yield subtitle(copy.copy(self.options), subtype, dataj["subtitles_for_hearing_impaired"])
if streamj["streams"]["medium"]:
filename = streamj["streams"]["medium"]