From 0ad7ed3c18435bf1273796ae6ec9780b4cc8ecdc Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 9 May 2015 02:17:58 -0500 Subject: [PATCH] Added support for webclient message Both "send message" and "send text" --- resources/lib/WebSocketClient.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/lib/WebSocketClient.py b/resources/lib/WebSocketClient.py index 5ea9a3fb..e5065f14 100644 --- a/resources/lib/WebSocketClient.py +++ b/resources/lib/WebSocketClient.py @@ -179,6 +179,19 @@ class WebSocketThread(threading.Thread): self.remove_items(itemsRemoved) self.update_items(itemsToUpdate) + elif messageType == "GeneralCommand": + + if data.get("Name") == "DisplayMessage": + message = data.get("Arguments") + header = message[u'Header'] + text = message[u'Text'] + xbmcgui.Dialog().notification(header, text) + + elif data.get("Name") == "SendString": + message = data.get("Arguments") + string = message[u'String'] + xbmcgui.Dialog().notification("Emby server", string) + def remove_items(self, itemsRemoved): #Process video library