Fix navigation not waking up screen
This commit is contained in:
parent
51400fd828
commit
fd395083bd
1 changed files with 18 additions and 18 deletions
|
@ -15,7 +15,7 @@ import downloadutils
|
||||||
import librarysync
|
import librarysync
|
||||||
import playlist
|
import playlist
|
||||||
import userclient
|
import userclient
|
||||||
from utils import window, settings, language as lang
|
from utils import window, settings, language as lang, JSONRPC
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
|
@ -200,19 +200,24 @@ class WebSocket_Client(threading.Thread):
|
||||||
|
|
||||||
elif command == "SendString":
|
elif command == "SendString":
|
||||||
|
|
||||||
string = arguments['String']
|
params = {
|
||||||
text = {
|
'text': arguments['String'],
|
||||||
|
'done': False
|
||||||
'jsonrpc': "2.0",
|
|
||||||
'id': 0,
|
|
||||||
'method': "Input.SendText",
|
|
||||||
'params': {
|
|
||||||
|
|
||||||
'text': "%s" % string,
|
|
||||||
'done': False
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
result = xbmc.executeJSONRPC(json.dumps(text))
|
result = JSONRPC("Input.SendText").execute(params)
|
||||||
|
|
||||||
|
elif command in ("MoveUp", "MoveDown", "MoveRight", "MoveLeft"):
|
||||||
|
# Commands that should wake up display
|
||||||
|
actions = {
|
||||||
|
'MoveUp': "Input.Up",
|
||||||
|
'MoveDown': "Input.Down",
|
||||||
|
'MoveRight': "Input.Right",
|
||||||
|
'MoveLeft': "Input.Left"
|
||||||
|
}
|
||||||
|
result = JSONRPC(actions[command]).execute()
|
||||||
|
|
||||||
|
elif command == "GoHome":
|
||||||
|
result = JSONRPC("GUI.ActivateWindow").execute({"window":"home"})
|
||||||
|
|
||||||
else:
|
else:
|
||||||
builtin = {
|
builtin = {
|
||||||
|
@ -220,13 +225,8 @@ class WebSocket_Client(threading.Thread):
|
||||||
'ToggleFullscreen': 'Action(FullScreen)',
|
'ToggleFullscreen': 'Action(FullScreen)',
|
||||||
'ToggleOsdMenu': 'Action(OSD)',
|
'ToggleOsdMenu': 'Action(OSD)',
|
||||||
'ToggleContextMenu': 'Action(ContextMenu)',
|
'ToggleContextMenu': 'Action(ContextMenu)',
|
||||||
'MoveUp': 'Action(Up)',
|
|
||||||
'MoveDown': 'Action(Down)',
|
|
||||||
'MoveLeft': 'Action(Left)',
|
|
||||||
'MoveRight': 'Action(Right)',
|
|
||||||
'Select': 'Action(Select)',
|
'Select': 'Action(Select)',
|
||||||
'Back': 'Action(back)',
|
'Back': 'Action(back)',
|
||||||
'GoHome': 'ActivateWindow(Home)',
|
|
||||||
'PageUp': 'Action(PageUp)',
|
'PageUp': 'Action(PageUp)',
|
||||||
'NextLetter': 'Action(NextLetter)',
|
'NextLetter': 'Action(NextLetter)',
|
||||||
'GoToSearch': 'VideoLibrary.Search',
|
'GoToSearch': 'VideoLibrary.Search',
|
||||||
|
|
Loading…
Reference in a new issue