From c9020020e734e45864dd766606a3ea165c0acf88 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Wed, 15 Feb 2017 00:47:36 +0100 Subject: [PATCH] svtplay: fixes for exclude in genre and -A --- lib/svtplay_dl/service/svtplay.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index 1620acc..bb1eeae 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -129,19 +129,14 @@ class Svtplay(Service, OpenGraphThumbMixin): parse = urlparse(self._url) dataj= jansson["clusterPage"] tab = re.search("tab=(.+)",parse.query) - if(tab): + if tab: tab = tab.group(1) for i in dataj["tabs"]: if i["slug"] == tab: - for n in i["content"]: - parse = urlparse(n["contentUrl"]) - if parse.path not in videos: - videos.append(parse.path) - else: - for i in dataj["clips"]: - parse = urlparse(i["contentUrl"]) - if parse.path not in videos: - videos.append(parse.path) + videos = self.videos_to_list(i["content"], videos) + else: + videos = self.videos_to_list(dataj["clips"], videos) + return videos def find_all_episodes(self, options):