mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 23:24:16 +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:
parent
a986b9aeea
commit
a9c579ba5f
@ -34,10 +34,15 @@ class Urplay(Service, OpenGraphThumbMixin):
|
|||||||
if len(jsondata["subtitles"]) > 0:
|
if len(jsondata["subtitles"]) > 0:
|
||||||
for sub in jsondata["subtitles"]:
|
for sub in jsondata["subtitles"]:
|
||||||
if "label" in sub:
|
if "label" in sub:
|
||||||
if self.options.get_all_subtitles:
|
absurl = urljoin(self.url, sub["file"].split(",")[0])
|
||||||
yield subtitle(copy.copy(self.options), "tt", sub["file"].split(",")[0], "-" + filenamify(sub["label"]))
|
if absurl.endswith("vtt"):
|
||||||
|
subtype = "wrst"
|
||||||
else:
|
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"]:
|
if "streamer" in jsondata["streaming_config"]:
|
||||||
basedomain = jsondata["streaming_config"]["streamer"]["redirect"]
|
basedomain = jsondata["streaming_config"]["streamer"]["redirect"]
|
||||||
|
Loading…
Reference in New Issue
Block a user