Hi,
Just having issues JSON-RPC with the Eden Nightlies, so I wanted to list out a couple of examples.
1) Retrieve Information from XBMC with a Command
{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": 1 }
2) Retrieve Information from XBMC with a Command and a Parameter
{ "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": { "properties": [ "playcount" ] }, "id": 1 }
3) Retrieve Information from XBMC with a Command and more than 1 Parameter
{ "jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": { "properties": [ "playcount", "year" ] }, "id": 1 }
So, those all work, but the one I'm currently having issue with is ...
Player.GetItem
USING: { "jsonrpc": "2.0", "method": "Player.GetItem", "params": { "playerid": 1 }, "id": 1 }
or
USING: { "jsonrpc": "2.0", "method": "Player.GetItem", "params": { "playerid": 1, "properties": ["title"] }, "id": 1 }
ERROR: {"error":{"code":-32100,"message":"Failed to execute method."},"id":1,"jsonrpc":"2.0"}
Any ideas what the appropriate call is for Player.GetItem ?
Using JSON-RPC ...
sikosis
Junior Member Posts: 12 Joined: Sep 2011 Reputation: 0 |
2011-12-19 08:49
Post: #1
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2011-12-19 10:12
Post: #2
You first need to call Player.GetActivePlayers to see which player is active and then use the "playerid" you got from that response to call Player.GetItem. Player.GetItem (and all the other Player methods) will return "Failed to execute method" if you pass a playerid to a player which is not active.
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. ![]() |
| find quote |
sikosis
Junior Member Posts: 12 Joined: Sep 2011 Reputation: 0 |
2011-12-20 01:14
Post: #3
Ah cool ... thanks for that. I did have something playing initially when I started testing, but it had obviously stopped and I thought if it was stopped it would bring back 0 or Nothing Playing as it's status. So, good to know.
Thanks for pointing me in the right direction. |
| find quote |
realjobe
Posting Freak Posts: 948 Joined: Sep 2004 Reputation: 0 |
2012-04-11 11:18
Post: #4
Thank you aswell. I've also been working with this new-world.
http://forum.xbmc.org/showthread.php?tid=125631
|
| find quote |


![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
Search
Help