Posts: 5,184
Joined: Jan 2009
Reputation:
131
I can't say but it sounds like a very specific request.
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: 105
Joined: Aug 2011
Reputation:
0
Hi,
I'm not sure this is the right area to post but let me know.
I would like to know if there is or if it is possible to have the following commands:
- direct acces to subtitles menu while watching a movie
- direct acces to video settings menu while watching a movie
- an exit command to exit this menus (and other) and go back to the movie full screen
thank you
Posts: 5,184
Joined: Jan 2009
Reputation:
131
JSON-RPC only has a very limited set of methods that can be used for remote controlling XBMC like using a remote and directly accessing the subtitles menu or the video settings menu are not even available for normal remotes and as long as that's how it is for the rest of XBMC it will also stay that way for JSON-RPC.
Exiting menus is always possible with Input.Back.
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: 105
Joined: Aug 2011
Reputation:
0
I tought you could do more with Json than what the normal remote does?
the problem with Input.Back is if you execute this command while watching a movie, the home menu shows up while the movie is still playing in background!
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Sure you can do more than a normal remote but that's also why JSON-RPC provides almost no methods in the area of remote controling as that can already be done with normal remotes. JSON-RPC provides access to XBMC's libraries etc. So it might be better to specify what exactly you want to do and maybe it is possible to add methods to do what you want without having to navigate to the specific dialog/window in XBMC's GUI.
Why do you need access to the subtitles menu anyway? JSON-RPC provides ways to retrieve all the subtitles available for the currently playing video and it also has methods to change/enable/disable the subtitle.
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: 105
Joined: Aug 2011
Reputation:
0
so i'm not wrong by saying you guys can add control/acces to specific menus with Json commands?
i know this command to enable/disable subs:
{"jsonrpc": "2.0", "method": "Player.SetSubtitle", "params": {"playerid": 1, "subtitle" : "on"}, "id": "1"}
{"jsonrpc": "2.0", "method": "Player.SetSubtitle", "params": {"playerid": 1, "subtitle" : "off"}, "id": "1"}
but i use the subtitles add on, so would to have a command to have direct access to this add on to download the subs in the right language.
not sure my request is clear?
and also another specific command to exit any menu while watching a movie or listening to music, (like the "ESC" on a windows machine.)
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Well in general it would be possible to allow access to specific dialogs etc but that doesn't mean that it will be supported. The JSON-RPC API should be as clean as possible to keep it as stable as possible. Furthermore your request concerning the subtitles addon is on a whole different level because it does not have to do with a dialog from XBMC core but from an addon so it's not even certain whether the addon is installed or not. The JSON-RPC API won't provide methods to access an addon-specific feature because those methods wouldn't work if the addon isn't installed. Furthermore addon integration may vary depending on the skin you use.
What is planned concerning addons is to someday allow them to expose their own JSON-RPC methods which could be used by clients if the addon is installed.
I also looked into the behaviour of Input.Back that you described and I can't reproduce that. I started playing a movie, got to the OSD and then opened several different dialogs (video settings, audio settings, subtitle addon, ...) and then sent an Input.Back request to JSON-RPC and it always closed the dialog and went back to the fullscreen video (with OSD) so I'm not sure what you're problem there is. Maybe it's a skin related thing. I tested both with Confluence and Aeon Nox.
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: 105
Joined: Aug 2011
Reputation:
0
I uderstant the problem of the add on, but i would also be happy with a json command to openthe sbutitles dialog (where i can choose a files fir the subs and set the offset...)
have you tried to sent the Input.Back request while watching a movie (without any dialog or menu open) just when watching the movie?
Posts: 105
Joined: Aug 2011
Reputation:
0
yes i understant the problem with the add on, i was in my last message talking about the standard xbmc subtitle menu.
ok i wil try again.
thank you
Posts: 794
Joined: Apr 2011
Reputation:
16
Mizaki
Posting Freak
Posts: 794
Nice.
Will any of these additions (plus future ones) make it into an 11.x release? I can imagine a lot of these being very useful and it'll be a shame to have to wait a year or so before using them.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
I just pushed a major refactor of how the webserver works internally. Currently this has only one effect on how it works and that affects JSON-RPC clients using JSON-RPC over HTTP. You need to make sure you set the Content-Type in the HTTP header to "application/json" and not something like "multipart/form-data" because that is plain wrong. The new implementation has the functionality to parse POST data for certain content-types (including application/json and multipart/form-data) and will therefore fail if the content-type does not match the actual POST data.
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.