• 1
  • 85
  • 86
  • 87(current)
  • 88
  • 89
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
First of all, I welcome all the changes and I am not against breaking backwards compatibility; there's a clear-cut line, you have Dharma and then there's Eden and for Eden the JSON-RPC API will be extended and made better, and that's a good reason to not stay backwards compatible.

I see a lot of discussions on the forums here that nightly builds break (remote control) applications, and developers (including myself) need to tell users what nightly build they should use. As developer I just pick a certain set of API changes to support, and that's that. It's simply not doable to support all nightly builds back in time.

Though, there might be a way to help developers of applications that use the JSON-RPC API and the users of nightly builds. Maybe the protocolversion could have a 'minior' version, e.g. 3.1, 3.2, etc. This number could be increased in the development period each time a new 'breaking' change is added. That would mean that for example for the Eden nightly builds we would have had multiple protocol-versions. Applications using the interface could use that protocol version to check whether the build that the user is using is still supported. Instead of random crashes or functionality that does not work, an application could give the user a decent warning or error message.

I just wanted to pose this as an idea. Maybe it's not needed anymore if the development after Eden won't have changes breaking compatibility. Though if the new nightly builds would add features, it could also be a way for applications to determine whether the user has the right nightly build to enable this new feature.

As said, it's an idea, I hope you might like it, if not, that's fine too. But besides all this, thanks for the hard work enabling the many useful remote control applications for XBMC! Looking forward to the final Eden release.
Reply
We could add a minor tag to the version for sure. Though the idea is that if the major is odd number its in development and NOT something remote applications should support. Remote applications should only support the even numbers. I know this kindof goes against the whole nightly stuff but I'd prefer if xbmc released more often so nightlies are never needed to be supported Smile
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Hi guys,

I was planning on using "XBMC.GetInfoLabels" to get weather info (Window(Weather).Property(key)). Is this going to be changed?


Cheers
Jason
Reply
How to show the GUI while playing video (in fullscreen). It seems Input.Select/Left etc doesn't show the GUI. I need it for example to open the subtitles menu.
Reply
topfs2 Wrote:We could add a minor tag to the version for sure. Though the idea is that if the major is odd number its in development and NOT something remote applications should support. Remote applications should only support the even numbers. I know this kindof goes against the whole nightly stuff but I'd prefer if xbmc released more often so nightlies are never needed to be supported Smile

I totally agree that a faster release cycle would be a good solution to the problem!

I'd rather support only stable (even) protocol version, however not supporting nightly builds is a problem, because their use is very popular. So I still believe that unless XBMC's release cycle would shorten or the API's backwards compatibility isn't being broken anymore, a minor version could help remote application developers and their users.

Thanks for considering it.
Reply
jasonvp Wrote:Hi guys,

I was planning on using "XBMC.GetInfoLabels" to get weather info (Window(Weather).Property(key)). Is this going to be changed?


Cheers
Jason

Ideally we would like to get rid of XBMC.GetInfoLabels but we will first try to provide other means of accessing the mostly needed information provided by that method before removing it. So create a feature request ticket that you would like to access the weather information through jsonrpc and maybe it will be added in the future so you don't need to use XBMC.GetInfoLabels for it.
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.
Reply
Montellese Wrote:Ideally we would like to get rid of XBMC.GetInfoLabels but we will first try to provide other means of accessing the mostly needed information provided by that method before removing it. So create a feature request ticket that you would like to access the weather information through jsonrpc and maybe it will be added in the future so you don't need to use XBMC.GetInfoLabels for it.

Will do. Thanks.


In regards to the below question.
jasonvp Wrote:Hi Montellese,

Are there any plans for more discrete navigation control of the GUI?

For example currently there is Input Home etc. What about Input Weather, Pictures, Videos, Music, Programs, System and their Sub Folders?

Montellese Wrote:I'm not sure as in some skins entering the Videos section (or any other of the main sections) without going through the home screen messes with the logic and design. Furthermore subfolders are partly skin-dependant as well so it would be difficult to get it right on every skin.

Opening Windows and Dialogs and Keymap.xml have examples of navigating directly to windows with a remote control. Could this be done in a similar way using JSON (XBMC.ActivateWindow(windowid))?



Cheers
Jason
Reply
jasonvp Wrote:Opening Windows and Dialogs and Keymap.xml have examples of navigating directly to windows with a remote control. Could this be done in a similar way using JSON (XBMC.ActivateWindow(windowid))?

The problem is that we want to have as much control over what is being executed using jsonrpc as possible. That's why we don't want a generic Input.Key method which takes any possible key and executes it.
Furthermore there is the EventServer which is available for the purpose of handling this kind of input. That's why we only provide very basic input functionality like Left, Right, Up, Down, Select etc right now.
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.
Reply
OK here is another set of final tweaks to clean up the API:

Saturday, October 8th 2011:
Commits: 845288d417d40dea22f6, c2d1e992fdd64f380d67, 6c9af5c7c0ae8075c0f8, c00ff2defb35333206f2, 253dd7e808d1e7a83682
  • renamed "value" parameter of Application.Setvolume to "volume"
  • refactored Application.ToggleMute into Application.SetMute which takes the following parameters: true, false, "toggle"
  • removed optional parameter "albums" from AudioLibrary.GetRecentlyAddedAlbums (use the "limits" parameter to limit the number of returned items (maximum is 25))
  • renamed parameter "albums" from AudioLibrary.GetRecentlyAddedSongs to "albumlimit"
  • refactored (Audio|Video)Library.Export parameters using union types to better distinguish between single and multi file export
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.
Reply
Am I right in thinking there is no way to retrieve what order an episode is in (DVD, absolute, "normal")? I want to make sure I'm not missing it before I make a feature request.

Thanks.
Image
AWXi - Ajax web interface. Wiki
Reply
Hi,

is there any way to get the xbmc internal GlobalIdleTime over jsonrpc?
I already tried to get this value via "System.GetProperties", "Application.GetProperties" or "XBMC.GetInfoLabels" but without success. Do I miss something?

In python this is doable via "xbmc.getGlobalIdleTime()".

regards,
sphere
My GitHub. My Add-ons:
Image
Reply
Ok, this seems to be the place to ask my JSON-RPC questions...

I'm trying to switch back and forth between a video play list and a slideshow.

I start the video playlist using:

Code:
{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": "special://profile/playlists/video/all videos.m3u" } }, "id": 1 }

I start the slide show using:

Code:
{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "path": "smb://HP-MEDIA-SERVER/Photos/Melissa Scans Part 1" } }, "id": 1 }

Sometimes this seems to work ok, although there is a flash of the GUI. But sometimes instead of playing it'll only show the current activity or go back to the home screen or whatever. Is there something I'm doing wrong?

Also it doesn't seem like the video playlist is random, which seems to be the default, what is the syntax to add the random property?
Reply
Mizaki Wrote:Am I right in thinking there is no way to retrieve what order an episode is in (DVD, absolute, "normal")? I want to make sure I'm not missing it before I make a feature request.

Thanks.

Correct. AFAIK XBMC only provides the possibility to specify the episode order for tv sources and then passes this information on to the scraper but from there on there is no way to tell what order episodes in a season/show are in. So this is not really a jsonrpc feature as it is not even available in XBMC itself.
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.
Reply
sphere Wrote:is there any way to get the xbmc internal GlobalIdleTime over jsonrpc?
I already tried to get this value via "System.GetProperties", "Application.GetProperties" or "XBMC.GetInfoLabels" but without success. Do I miss something?
No there isn't (AFAIK). IIRC there already is a pull request for this but as it is a very XBMC specific feature we haven't decided yet how to make it available through JSONRPC.

khargy Wrote:Ok, this seems to be the place to ask my JSON-RPC questions...

I'm trying to switch back and forth between a video play list and a slideshow.
What do you mean by "switch back and forth"? You can't view a slideshow while watching a video and starting a video "destroys" the slideshow.

khargy Wrote:But sometimes instead of playing it'll only show the current activity or go back to the home screen or whatever.
What do you mean by "current activity"?

khargy Wrote:Is there something I'm doing wrong?
The calls to jsonrpc look correct. I can't test the exact same procedure because I don't have any video playlist files but starting a video using Player.Open and then starting a slideshow using Player.Open doesn't work for me either anymore. The video stops but the slideshow isn't started. Can you please create a bug ticket for this and cc me. Thanks.

khargy Wrote:Also it doesn't seem like the video playlist is random, which seems to be the default, what is the syntax to add the random property?
Yeah Player.Open doesn't provide the possibility to specify a "random" parameter for the videos or music, only for slideshows. And by default random is disabled for videos because I normally prefer to watch my tv episodes in the right order and not in a random order Wink But you can call "Player.Shuffle" after you started the video playlist to randomize the playlist.
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.
Reply
Montellese Wrote:What do you mean by "switch back and forth"? You can't view a slideshow while watching a video and starting a video "destroys" the slideshow.

No not at the same time, so I have a bunch of home movies and a bunch of photos. I want to play the movies for like 10 minutes then play the photos for 10 minutes and keep going back and forth. Since they will be on random order you'll see different stuff for the most part each time. (This will on the tv at my wedding!)


Montellese Wrote:What do you mean by "current activity"?

So lets say I started the first play.open (playlist) when I was on the weather screen. When I do the 2nd one (slideshow), I'm back on the weather screen basically as if I stopped the player. if I run the slideshow play.open a 2nd time in a row and it'll start.


Montellese Wrote:Yeah Player.Open doesn't provide the possibility to specify a "random" parameter for the videos or music, only for slideshows. And by default random is disabled for videos because I normally prefer to watch my tv episodes in the right order and not in a random order Wink But you can call "Player.Shuffle" after you started the video playlist to randomize the playlist.

So after I called player.open for the video playlist I called:

Code:
{"jsonrpc": "2.0", "method": "Player.Shuffle", "params": [1], "id": 1}

I get an "ok" result but when I go to the next item it's still in order.
Reply
  • 1
  • 85
  • 86
  • 87(current)
  • 88
  • 89
  • 226

Logout Mark Read Team Forum Stats Members Help
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC8