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

urplay: add support for only audio streams

This commit is contained in:
Johan Andersson 2022-06-09 21:56:37 +02:00
parent 578b7f2754
commit 6bd9be5555

View File

@ -44,6 +44,9 @@ class Urplay(Service, OpenGraphThumbMixin):
if "hd" in stream:
url = f"https://{loadbalancer}/{stream['hd']['location']}playlist.m3u8"
yield from hlsparse(self.config, self.http.request("get", url), url, output=self.output)
if "m4A" in stream:
url = f"https://{loadbalancer}/{stream['m4A']['location']}playlist.m3u8"
yield from hlsparse(self.config, self.http.request("get", url), url, output=self.output)
if not (self.config.get("get_all_subtitles")) and streaminfo == "sweComplete":
yield subtitle(copy.copy(self.config), "wrst", stream["tt"]["location"].replace(".tt", ".vtt"), output=self.output)