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

viaplay: don’t try to yield empty streams

This commit is contained in:
Johan Andersson 2015-01-16 21:18:54 +01:00
parent 2a941a6cce
commit 723b7df1c8

View File

@ -111,8 +111,9 @@ class Viaplay(Service, OpenGraphThumbMixin):
if streamj["streams"]["hls"]: if streamj["streams"]["hls"]:
streams = hlsparse(streamj["streams"]["hls"]) streams = hlsparse(streamj["streams"]["hls"])
for n in list(streams.keys()): if streams:
yield HLS(copy.copy(options), streams[n], n) for n in list(streams.keys()):
yield HLS(copy.copy(options), streams[n], n)
def find_all_episodes(self, options): def find_all_episodes(self, options):
format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata()[1]) format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata()[1])