Skip to content

Commit

Permalink
speedup jackett/prowlarr search
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jun 29, 2024
1 parent 4a51432 commit 66ed186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand All @@ -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()
Expand Down

0 comments on commit 66ed186

Please sign in to comment.