From 723b7df1c86ec8bbe142fd666485c96132e0c759 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Fri, 16 Jan 2015 21:18:54 +0100 Subject: [PATCH] =?UTF-8?q?viaplay:=20don=E2=80=99t=20try=20to=20yield=20e?= =?UTF-8?q?mpty=20streams?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/svtplay_dl/service/viaplay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py index 2e8fa2a..84c8b0c 100644 --- a/lib/svtplay_dl/service/viaplay.py +++ b/lib/svtplay_dl/service/viaplay.py @@ -111,8 +111,9 @@ class Viaplay(Service, OpenGraphThumbMixin): if streamj["streams"]["hls"]: streams = hlsparse(streamj["streams"]["hls"]) - for n in list(streams.keys()): - yield HLS(copy.copy(options), streams[n], n) + if streams: + for n in list(streams.keys()): + yield HLS(copy.copy(options), streams[n], n) def find_all_episodes(self, options): format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata()[1])