1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

discoveryplus: streams is a list and not a dict

This commit is contained in:
Johan Andersson 2021-05-18 20:54:19 +02:00
parent c9a606d306
commit 94ed271397

View File

@ -99,15 +99,15 @@ class Discoveryplus(Service):
httpobject=self.http, httpobject=self.http,
output=self.output, output=self.output,
) )
for n in list(streams.keys()): for stream in streams:
if isinstance(streams[n], subtitle): # we get the subtitles from the hls playlist. if isinstance(stream, subtitle): # we get the subtitles from the hls playlist.
if self.config.get("get_all_subtitles"): if self.config.get("get_all_subtitles"):
yield streams[n] yield stream
else: else:
if streams[n].subfix in country and country[streams[n].subfix] in self.domain: if stream.subfix in country and country[stream.subfix] in self.domain:
yield streams[n] yield stream
else: else:
yield streams[n] yield stream
def _autoname(self, jsondata): def _autoname(self, jsondata):
match = re.search("^([^/]+)/", jsondata["data"]["attributes"]["path"]) match = re.search("^([^/]+)/", jsondata["data"]["attributes"]["path"])