From 24c1be3fd212cfc3cad8dcfd48de6388caf8ebb4 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 21 May 2018 22:56:22 +0200 Subject: [PATCH] viafree: replace options with config --- lib/svtplay_dl/service/viaplay.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py index 16bc5f7..b64f3b1 100644 --- a/lib/svtplay_dl/service/viaplay.py +++ b/lib/svtplay_dl/service/viaplay.py @@ -183,7 +183,7 @@ class Viaplay(Service, OpenGraphThumbMixin): for n in list(streams.keys()): yield streams[n] - def find_all_episodes(self, options): + def find_all_episodes(self, config): seasons = [] match = re.search("(sasong|sesong)-(\d+)", urlparse(self.url).path) if match: @@ -195,9 +195,9 @@ class Viaplay(Service, OpenGraphThumbMixin): for i in janson["format"]["seasons"]: seasons.append(i["seasonNumber"]) - episodes = self._grab_episodes(options, seasons) - if options.all_last > 0: - return episodes[-options.all_last:] + episodes = self._grab_episodes(config, seasons) + if config.get("all_last") > 0: + return episodes[-config.get("all_last"):] return sorted(episodes) def _grab_episodes(self, config, seasons):