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

Fix subtitles in urplay

The subtitle url was relative (in particular it left out the scheme)
Never videos appears to use VTT/WRST format
This commit is contained in:
Anders Waldenborg 2016-11-30 23:21:42 +01:00
parent a986b9aeea
commit a9c579ba5f

View File

@ -34,11 +34,16 @@ class Urplay(Service, OpenGraphThumbMixin):
if len(jsondata["subtitles"]) > 0:
for sub in jsondata["subtitles"]:
if "label" in sub:
if self.options.get_all_subtitles:
yield subtitle(copy.copy(self.options), "tt", sub["file"].split(",")[0], "-" + filenamify(sub["label"]))
absurl = urljoin(self.url, sub["file"].split(",")[0])
if absurl.endswith("vtt"):
subtype = "wrst"
else:
yield subtitle(copy.copy(self.options), "tt", sub["file"].split(",")[0])
subtype = "tt"
if self.options.get_all_subtitles:
yield subtitle(copy.copy(self.options), subtype, absurl, "-" + filenamify(sub["label"]))
else:
yield subtitle(copy.copy(self.options), subtype, absurl)
if "streamer" in jsondata["streaming_config"]:
basedomain = jsondata["streaming_config"]["streamer"]["redirect"]
else: