Posts: 94
Joined: Sep 2010
Reputation:
0
hey I am hoping someone can help me out I am trying to figure out how to usew one json command that will both do left and right and skipback and skipforward but I have been unable to get any commands to work.
Thanks,
Yonu
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Try Input.ExecuteAction with "left" and "right".
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 94
Joined: Sep 2010
Reputation:
0
ok here is what I have but it still doesn't work it only will move the selector left or right but has no effect on the playing media
{ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "right" }, "id": 1 }
Thanks,
Yonu
Posts: 94
Joined: Sep 2010
Reputation:
0
any suggestions? as best I can tell I have the syntax correct
Posts: 1,109
Joined: Feb 2011
Reputation:
39
I think I read elsewhere that the Input methods don't have the same effect as pressing the cursor keys ie Input.Left doesn't have the same effect as pressing left key. If you want to fast forward/rewind then you need to use the Player.Seek method instead.
Posts: 94
Joined: Sep 2010
Reputation:
0
is there a way then to make it see a json command as a remote or gamepad press then?
Thanks,
Yonu
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Not that I'm aware of. However, you can use JSON to detect if a player is active and, if so, then use your script to send the appropriate JSON command.
Alternatively, I think the python eventclient code can send keyboard presses.
@Montellese: This has come up before. Personally, not an issue for me but I'm curious: would it be a big change for the Input.Action methods to mimic keyboard presses (or implement a separate method)?
Posts: 3,077
Joined: Jun 2009
Both were refused because of potential non pre-determined action generated by custom keymap file.
While for most user keymap files are the exact reason they need this to keep consistency in behaviors
Anyway eventclient is your only chance for now to mimic keyboard.
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Thanks Tolriq. I thought it would be something like that.
Posts: 6
Joined: Oct 2020
Reputation:
0
hello, I would like Kodi to enter and start the photos I have on the google drive at startup.
i tried with the following
code:
import xbmc
xbmc.executebuiltin ("RunAddon (plugin.image.flickr)")
it goes no further and I don't know what the right syntax is.
can you help me?