From bdfef9f8b70b15b33e80cc08c27311d7269369d7 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 16 May 2015 02:11:41 -0500 Subject: [PATCH] SendString - General command It just clicked in my mind that "send string" can be used to input to keyboard dialogs in kodi. Awesome :) --- resources/lib/WebSocketClient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/WebSocketClient.py b/resources/lib/WebSocketClient.py index fd17fd93..aa65b468 100644 --- a/resources/lib/WebSocketClient.py +++ b/resources/lib/WebSocketClient.py @@ -242,7 +242,8 @@ class WebSocketThread(threading.Thread): xbmcgui.Dialog().notification(header, text) elif command == "SendString": string = arguments[u'String'] - xbmcgui.Dialog().notification("Emby server", string) + text = '{"jsonrpc": "2.0", "method": "Input.SendText", "params": { "text": "%s", "done": false }, "id": 0}' % string + result = xbmc.executeJSONRPC(text) else: self.logMsg("Unknown command.", 1)