From 80a8094661fee7b8c28ef260a5fb623870c137ba Mon Sep 17 00:00:00 2001 From: Jespor Date: Sat, 31 Oct 2020 17:15:15 +0100 Subject: [PATCH] Updated the API URL to work for NO and DK. It's testet to work. --- lib/svtplay_dl/service/dplay.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/service/dplay.py b/lib/svtplay_dl/service/dplay.py index 2eada87..f7a4844 100644 --- a/lib/svtplay_dl/service/dplay.py +++ b/lib/svtplay_dl/service/dplay.py @@ -132,7 +132,12 @@ class Dplay(Service): logging.error("Something went wrong getting token for requests") premium = self._checkpremium() - url = "http://disco-api.{}/cms/routes/program/{}?decorators=viewingHistory&include=default".format(self.domain, match.group(2)) + + urllocal='' + if self.domain in ['dplay.dk', 'dplay.no']: + urllocal = 'mer' + + url = "http://disco-api.{}/cms/routes/program{}/{}?decorators=viewingHistory&include=default".format(self.domain, urllocal,match.group(2)) res = self.http.get(url) for what in res.json()["included"]: if "attributes" in what and "alias" in what["attributes"] and "season" in what["attributes"]["alias"]: