mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
disoveryplus: only add showid when we need it
This commit is contained in:
parent
a06a138d90
commit
774e29a104
@ -154,18 +154,20 @@ class Dplay(Service):
|
||||
if ses["id"] == "seasonNumber":
|
||||
for opt in ses["options"]:
|
||||
seasons.append(opt["value"])
|
||||
showid = what["attributes"]["component"]["mandatoryParams"]
|
||||
if "mandatoryParams" in what["attributes"]["component"]:
|
||||
showid = what["attributes"]["component"]["mandatoryParams"]
|
||||
|
||||
if programid:
|
||||
for season in seasons:
|
||||
page = 1
|
||||
totalpages = 1
|
||||
while page <= totalpages:
|
||||
querystring = "decorators=viewingHistory&include=default&page[items.number]={}&{}&pf[seasonNumber]={}".format(
|
||||
querystring = "decorators=viewingHistory&include=default&page[items.number]={}&pf[seasonNumber]={}".format(
|
||||
page,
|
||||
showid,
|
||||
season,
|
||||
)
|
||||
if showid:
|
||||
querystring += "&{}".format(showid)
|
||||
res = self.http.get("https://disco-api.{}/cms/collections/{}?{}".format(self.domain, programid, querystring))
|
||||
janson = res.json()
|
||||
totalpages = janson["data"]["meta"]["itemsTotalPages"]
|
||||
|
Loading…
Reference in New Issue
Block a user