From e53a2741da2a5cee8b4d9389e1c17e7db9ea7a29 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 25 Dec 2014 23:55:53 +0100 Subject: [PATCH] =?UTF-8?q?get=5Fmedia:=20do=20not=20try=20to=20parse=20ep?= =?UTF-8?q?isodes=20when=20we=20can=E2=80=99t=20find=20any.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this fixes #194 --- lib/svtplay_dl/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index c6011fc..d602eae 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -89,7 +89,8 @@ def get_media(url, options): return episodes = stream.find_all_episodes(options) - + if episodes is None: + return for idx, o in enumerate(episodes): if o == url: substream = stream