1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

urplay: fix a crash when getting subtitle.

for some reason they remove which one is default.
now we assume that swedish is the one
fixes: #1382
This commit is contained in:
Johan Andersson 2021-05-12 21:00:00 +02:00
parent a5e4166068
commit 8bcbd5dad4

View File

@ -49,7 +49,7 @@ class Urplay(Service, OpenGraphThumbMixin):
streams = hlsparse(self.config, self.http.request("get", url), url, output=self.output) streams = hlsparse(self.config, self.http.request("get", url), url, output=self.output)
for n in list(streams.keys()): for n in list(streams.keys()):
yield streams[n] yield streams[n]
if not (self.config.get("get_all_subtitles")) and (stream["default"]): 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) yield subtitle(copy.copy(self.config), "wrst", stream["tt"]["location"].replace(".tt", ".vtt"), output=self.output)
if self.config.get("get_all_subtitles") and "tt" in stream: if self.config.get("get_all_subtitles") and "tt" in stream: