JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC

  Thread Rating:
  • 7 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Montellese Offline
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #1571
Thanks for the report giftie. I fixed it in https://github.com/xbmc/xbmc/commit/6aa0...ffe74e43e8. You were right if the file was not in the database and XBMC wasn't able to retrieve any meta-data from it, it simply didn't show up in the response.

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: badge.gif]
find quote
samdret Offline
Junior Member
Posts: 18
Joined: Jan 2010
Reputation: 0
Post: #1572
Sorry if this has been asked a lot, but I can't seem to find any information regarding it.

After I've called JSONRPC.Introspect and gotten a list of available commands, where can I get information on which parameters each command accepts? I.e. I would like more than just label and id when I call VideoLibrary.GetRecentlyAddedMovies
find quote
Montellese Offline
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #1573
samdret Wrote:Sorry if this has been asked a lot, but I can't seem to find any information regarding it.

After I've called JSONRPC.Introspect and gotten a list of available commands, where can I get information on which parameters each command accepts? I.e. I would like more than just label and id when I call VideoLibrary.GetRecentlyAddedMovies

Unless you are using Dharma, JSONRPC.Introspect provides you will all the information about every parameter of every method. You can also find some (limited) information on the wiki.

In case you are using Dharma I recommend to either wait till Eden stable has been released or if you can't wait update to Eden Beta 1 and to take a look at the new introspect.

Concerning your question on VideoLibrary.GetRecentlyAddedMovies: You must specify the additional information you want in the "properties" parameter as an array of strings (e.g. [ "title", "rating", "thumbnail" ]).

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: badge.gif]
find quote
Mizaki Offline
Fan
Posts: 663
Joined: Apr 2011
Reputation: 12
Post: #1574
Should Player.SetSubtitle and Player.SetAudioStream trigger GUI notifications? Currently they don't seem to.

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
Montellese Offline
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #1575
What do you mean by GUI notification? A notification dialog telling you that you switched to audiostream XYZ? Don't you know that already because you initiated the action? AFAIK there's no such thing in XBMC.

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: badge.gif]
find quote
samdret Offline
Junior Member
Posts: 18
Joined: Jan 2010
Reputation: 0
Post: #1576
Montellese Wrote:Unless you are using Dharma, JSONRPC.Introspect provides you will all the information about every parameter of every method. You can also find some (limited) information on the wiki.

In case you are using Dharma I recommend to either wait till Eden stable has been released or if you can't wait update to Eden Beta 1 and to take a look at the new introspect.

Concerning your question on VideoLibrary.GetRecentlyAddedMovies: You must specify the additional information you want in the "properties" parameter as an array of strings (e.g. [ "title", "rating", "thumbnail" ]).

How stupid of me. The wrapper I'm using was dumbing down the content created from Introspect.

Got it up to snuff now Smile
find quote
Mizaki Offline
Fan
Posts: 663
Joined: Apr 2011
Reputation: 12
Post: #1577
Montellese Wrote:What do you mean by GUI notification? A notification dialog telling you that you switched to audiostream XYZ? Don't you know that already because you initiated the action? AFAIK there's no such thing in XBMC.

If I say toggle subtitles on or off with the "t" key a notification appears on screen basically saying subtitles on/off. I have mapped a key to switch audio streams. If I hit that I get a notification on screen telling me what audio stream I've switched to.

The question is really; should JSONRPC calls for these things act the same as a button press of the same function?

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
Montellese Offline
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #1578
Ah I only switch subtitles/audiostreams through the OSD dialog in the XBMC GUI so I never came across those notifications.

Good question concerning whether they should appear or not. I don't really have an opinion on it because I never used it so far. I'll have to think about it and aks other people what they'd expect.

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: badge.gif]
find quote
Mizaki Offline
Fan
Posts: 663
Joined: Apr 2011
Reputation: 12
Post: #1579
I think it would make life much easier for the user. Say you have 8 different subtitles. Atm you'd be blindly cycling through and having to wait for someone to talk to see which langague you are currently on. Whereas if you had the popup you'd know.

[Image: watched-clearlogo.jpg]
AWXi - Ajax web interface. Wiki
find quote
Montellese Offline
Team-XBMC Developer
Posts: 2,790
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #1580
I just pushed a commit which refactores the way the methods of the Input namespace work. Up until now Input.Left/Right/... could only be used for navigational purposes but didn't work in other places like in fullscreen video where the "Arrow Right" key on the keyboard performs a small seek forward. After this change executing the Input.Left method has the exact same effect as when pressing the "Arrow Left" key on the keyboard. Obviously this also applies to Input.Right/Up/Down/Back/Select.

I hope this makes using these methods easier and more intuitive. Furthermore addons now get a fully qualified action object in python with valid name and buttoncode (and not only with a valid action id).

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: badge.gif]
find quote
Post Reply