From 73be4c1266ff87db71bf6a5aceb0e8912905c682 Mon Sep 17 00:00:00 2001 From: Benjamin Krause Date: Fri, 25 Feb 2022 14:39:29 +0000 Subject: [PATCH] Update incorrect and inconsistent use of api url --- custom_components/medusa/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/medusa/sensor.py b/custom_components/medusa/sensor.py index 4fe773e..1319311 100644 --- a/custom_components/medusa/sensor.py +++ b/custom_components/medusa/sensor.py @@ -80,7 +80,7 @@ def update(self): init['icon'] = 'mdi:eye-off' card_json.append(init) - tv_shows = self.get_infos(self.protocol, self.host, self.port, self.token, self.web_root, 'future') + tv_shows = self.get_infos(self.protocol, self.host, self.port, self.web_root, self.token, 'future') directory = "{0}/www/custom-lovelace/{1}/images/".format(self.base_dir, self._name) if not os.path.exists(directory): @@ -126,8 +126,8 @@ def update(self): self.data = attributes self.delete_old_tvshows(del_images, directory) - def get_infos(self, proto, host, port, token, web_root, cmd): - url = "{0}://{1}:{2}{3}/api/{4}/?cmd={5}&type=today|soon".format( + def get_infos(self, proto, host, port, web_root, token, cmd): + url = "{0}://{1}:{2}{3}/api/v1/{4}/?cmd={5}&type=today|soon".format( proto, host, port, web_root, token, cmd) ifs_movies = requests.get(url).json() return ifs_movies