Merge pull request #431 from oddstr13/pr-10.7-1

Fix some minor issues highlighted by 10.7
This commit is contained in:
mcarlton00 2020-12-20 18:57:49 -05:00 committed by GitHub
commit a51fd6b932
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -259,7 +259,7 @@ class API(object):
def check_companion_installed(self):
try:
self._get("/Jellyfin.Plugin.KodiSyncQueue/GetServerDateTime")
self._get("Jellyfin.Plugin.KodiSyncQueue/GetServerDateTime")
return True
except Exception:
return False

View file

@ -135,6 +135,14 @@ class HTTP(object):
raise HTTPException("Unauthorized", error)
elif r.status_code == 400:
LOG.warning(error)
LOG.warning(data)
try:
LOG.warning(r.json())
except Exception:
LOG.warning(r.text)
elif r.status_code == 500: # log and ignore.
LOG.error("--[ 500 response ] %s", error)