Commit f6fce276 authored by echel0n's avatar echel0n

Places search result from indexer into list object if returned as dict.

Fixes SICKRAGE-APP-PY3-KZ
parent 9c3a3c04
......@@ -97,6 +97,9 @@ class SearchIndexersForShowNameHandler(BaseHandler, ABC):
try:
# search via series name
result = await self.run_task(lambda: t[search_term])
if isinstance(result, dict):
result = [result]
results.setdefault(indexer, []).extend(result)
except Exception:
continue
......
......@@ -199,7 +199,7 @@ class BTNProvider(TorrentProvider):
parsed_json = {}
try:
api = xmlrpc.client.Server(self.urls['api'])
api = xmlrpc.client.Server(self.urls['api'] + '/')
parsed_json = api.getTorrents(self.api_key, params or {}, int(results_per_page), int(offset))
time.sleep(5)
except xmlrpc.client.ProtocolError as e:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment