From 66ed186db3de038144b36aa031634af3938034c9 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Sun, 30 Jun 2024 00:14:33 +0200 Subject: [PATCH] speedup jackett/prowlarr search --- comet/utils/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comet/utils/general.py b/comet/utils/general.py index 31c763d..20d0927 100644 --- a/comet/utils/general.py +++ b/comet/utils/general.py @@ -80,7 +80,7 @@ async def getIndexerManager(session: aiohttp.ClientSession, indexerManagerType: results = [] if indexerManagerType == "jackett": - response = await session.get(f"{settings.INDEXER_MANAGER_URL}/api/v2.0/indexers/all/results?apikey={settings.INDEXER_MANAGER_API_KEY}&Query={query}&Tracker[]={'&Tracker[]='.join(indexer for indexer in indexers)}", timeout=timeout) + response = await session.get(f"{settings.INDEXER_MANAGER_URL}/api/v2.0/indexers/all/results?apikey={settings.INDEXER_MANAGER_API_KEY}&Query={query}&Tracker[]={'&Tracker[]='.join(indexer for indexer in indexers)}&Category[]=2000&Category[]=5000", timeout=timeout) response = await response.json() for result in response["Results"]: @@ -97,7 +97,7 @@ async def getIndexerManager(session: aiohttp.ClientSession, indexerManagerType: if indexer["definitionName"] in indexers: indexersId.append(indexer["id"]) - response = await session.get(f"{settings.INDEXER_MANAGER_URL}/api/v1/search?query={query}&indexerIds={'&indexerIds='.join(str(indexerId) for indexerId in indexersId)}&type=search", headers={ + response = await session.get(f"{settings.INDEXER_MANAGER_URL}/api/v1/search?query={query}&indexerIds={'&indexerIds='.join(str(indexerId) for indexerId in indexersId)}&categories=2000&categories=5000&type=search", headers={ "X-Api-Key": settings.INDEXER_MANAGER_API_KEY }) response = await response.json()