mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-22 07:52:46 +00:00
Catch bad passwords on addon startup
This commit is contained in:
parent
22b5d413fd
commit
de95d23e5a
3 changed files with 13 additions and 3 deletions
|
@ -430,7 +430,11 @@ class API(object):
|
|||
headers.update(auth_token_header)
|
||||
|
||||
response = self.send_request(server['address'], "system/info", headers=headers)
|
||||
return response.json() if response.status_code == 200 else {}
|
||||
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
else:
|
||||
return response.status_code
|
||||
|
||||
def get_public_info(self, server_address):
|
||||
response = self.send_request(server_address, "system/info/public")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue