From fa58296c758e91c383537c81faabc027fb72b87f Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 1 Oct 2018 02:27:19 -0500 Subject: [PATCH] Fix server detection in monitor --- resources/lib/emby/core/http.py | 2 +- resources/lib/monitor.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/emby/core/http.py b/resources/lib/emby/core/http.py index 9a735e5a..904aefe5 100644 --- a/resources/lib/emby/core/http.py +++ b/resources/lib/emby/core/http.py @@ -83,7 +83,7 @@ class HTTP(object): raise AttributeError("Request cannot be empty") data = self._request(data) - LOG.info("--->[ http ] %s", json.dumps(data, indent=4)) + LOG.debug("--->[ http ] %s", json.dumps(data, indent=4)) retry = data.pop('retry', 5) while True: diff --git a/resources/lib/monitor.py b/resources/lib/monitor.py index b495b060..f43643db 100644 --- a/resources/lib/monitor.py +++ b/resources/lib/monitor.py @@ -75,6 +75,9 @@ class Monitor(xbmc.Monitor): return try: + if not data.get('ServerId'): + raise Exception("ServerId undefined.") + if method != 'LoadServer' and data['ServerId'] not in self.servers: try: