From 0dcc3051c0f91330ef722a497cb8a0306aa2829b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Sat, 4 Nov 2023 17:25:31 +0100 Subject: [PATCH] Fix search --- resources/lib/vtmgo/util.py | 2 +- resources/lib/vtmgo/vtmgo.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/vtmgo/util.py b/resources/lib/vtmgo/util.py index 7f593b9..704c2f6 100644 --- a/resources/lib/vtmgo/util.py +++ b/resources/lib/vtmgo/util.py @@ -17,7 +17,7 @@ # Setup a static session that can be reused for all calls SESSION = requests.Session() SESSION.headers = { - 'User-Agent': 'VTM_GO/13.12 (be.vmma.vtm.zenderapp; build:17181; Android TV 28) okhttp/4.10.0', + 'User-Agent': 'VTM_GO/14.231023 (be.vmma.vtm.zenderapp; build:18041; Android 23) okhttp/4.11.0', 'x-app-version': '14', 'x-persgroep-mobile-app': 'true', 'x-persgroep-os': 'android', diff --git a/resources/lib/vtmgo/vtmgo.py b/resources/lib/vtmgo/vtmgo.py index 05dbe49..341870c 100644 --- a/resources/lib/vtmgo/vtmgo.py +++ b/resources/lib/vtmgo/vtmgo.py @@ -380,8 +380,8 @@ def do_search(self, search): :type search: str :rtype list[Union[Movie, Program]] """ - response = util.http_get(API_ENDPOINT + '/%s/search/?query=%s' % (self._mode(), - kodiutils.to_unicode(quote(kodiutils.from_unicode(search)))), + response = util.http_get(API_ENDPOINT + '/%s/search?query=%s' % (self._mode(), + kodiutils.to_unicode(quote(kodiutils.from_unicode(search)))), token=self._tokens.access_token if self._tokens else None, profile=self._tokens.profile if self._tokens else None) results = json.loads(response.text)