Hi,
I would like to retrieve informations about the movie or TV show currently play in XBMC :
- Episode or movie name
- Thumb
- Duration
- And current position
It's possible with JSON-RPC ? And if yes, how ?
Thank's in advance.
JSON and Player info
DKreeK
Junior Member Posts: 21 Joined: Jan 2010 Reputation: 0 |
2011-09-19 11:26
Post: #1
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2011-09-19 15:12
Post: #2
What version of XBMC are you using? If you use the very latest nightly build (from today) you must first call Player.GetActivePlayers, retrieve the playerid of the currently playing item and then call Player.GetProperties to retrieve the "playlistid" and the "position". Then you can call Playlist.GetItems to retrieve all items of that playlist and retrieve the current item using the value of "position". Using the "fields" parameter you can define the details you would like to retrieve like "title", "thumbnail" and "runtime" in your case.
We will consider adding a "currentitem" property to Player.GetProperties but we couldn't decide yet what information to provide (just the database ID's or additional detail). 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 |
DKreeK
Junior Member Posts: 21 Joined: Jan 2010 Reputation: 0 |
2011-09-19 16:28
Post: #3
I use the last stable version of XBMC. But if the version of the API change, I could manage different call with this number. So, I don't have the last nightly build what function I need to call ?
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2011-09-19 17:02
Post: #4
IIRC you need to call Player.GetActivePlayers to get the type of the player that is currently running. Then you need to call either VideoPlaylist.GetItems or AudioPlaylist.GetItems (depending on the type of player Player.GetActivePlayers returned). GetItems returns a list of items and a "current" value indicating the index of the currently playing item in the returned list of items. GetItems also takes the "fields" parameter to define what kind of information you would like.
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 |
realjobe
Posting Freak Posts: 950 Joined: Sep 2004 Reputation: 0 |
2012-04-11 11:19
Post: #5
Linking this to mine aswell. http://forum.xbmc.org/showthread.php?tid=125631
|
| find quote |


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