mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
viafree: replace options with config
This commit is contained in:
parent
81e327ec19
commit
24c1be3fd2
@ -183,7 +183,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
for n in list(streams.keys()):
|
for n in list(streams.keys()):
|
||||||
yield streams[n]
|
yield streams[n]
|
||||||
|
|
||||||
def find_all_episodes(self, options):
|
def find_all_episodes(self, config):
|
||||||
seasons = []
|
seasons = []
|
||||||
match = re.search("(sasong|sesong)-(\d+)", urlparse(self.url).path)
|
match = re.search("(sasong|sesong)-(\d+)", urlparse(self.url).path)
|
||||||
if match:
|
if match:
|
||||||
@ -195,9 +195,9 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
for i in janson["format"]["seasons"]:
|
for i in janson["format"]["seasons"]:
|
||||||
seasons.append(i["seasonNumber"])
|
seasons.append(i["seasonNumber"])
|
||||||
|
|
||||||
episodes = self._grab_episodes(options, seasons)
|
episodes = self._grab_episodes(config, seasons)
|
||||||
if options.all_last > 0:
|
if config.get("all_last") > 0:
|
||||||
return episodes[-options.all_last:]
|
return episodes[-config.get("all_last"):]
|
||||||
return sorted(episodes)
|
return sorted(episodes)
|
||||||
|
|
||||||
def _grab_episodes(self, config, seasons):
|
def _grab_episodes(self, config, seasons):
|
||||||
|
Loading…
Reference in New Issue
Block a user