tautulli fix

pull/282/head
meisnate12 4 years ago
parent e94d963f23
commit 5c89ee5478

@ -10,15 +10,15 @@ builders = ["tautulli_popular", "tautulli_watched"]
class TautulliAPI:
def __init__(self, params):
self.url = params["url"]
self.apikey = params["apikey"]
try:
response = self._request(f"{params['url']}/api/v2?apikey={params['apikey']}&cmd=get_library_names")
response = self._request(f"{self.url}/api/v2?apikey={self.apikey}&cmd=get_library_names")
except Exception:
util.print_stacktrace()
raise Failed("Tautulli Error: Invalid url")
if response["response"]["result"] != "success":
raise Failed(f"Tautulli Error: {response['response']['message']}")
self.url = params["url"]
self.apikey = params["apikey"]
def get_items(self, library, params):
query_size = int(params["list_size"]) + int(params["list_buffer"])

Loading…
Cancel
Save