SendString - General command

It just clicked in my mind that "send string" can be used to input to
keyboard dialogs in kodi. Awesome :)
This commit is contained in:
angelblue05 2015-05-16 02:11:41 -05:00
parent 79e4bd8a6a
commit bdfef9f8b7

View file

@ -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)