mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +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:
|
||||
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"]
|
||||
|
Loading…
Reference in New Issue
Block a user