Kodi Community Forum
getting currently playing item - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: getting currently playing item (/showthread.php?tid=190210)



getting currently playing item - Muhammed Refaat - 2014-03-24

I want to use json/rpc in order to get the currently playing item in the XBMC, I'm using the following commands for all the player types:

- to getting the Active player :
Code:
{ "jsonrpc": "2.0",  "method": "Player.GetActivePlayers",   "id": 1}

- And to getting the currently playing item due to it's result:

Code:
{"jsonrpc":"2.0","method":"Playlist.GetItems","params":{"playlistid":playlist.id,"properties":["title","rating","season","episode","plot","runtime","showtitle","thumbnail", "year","genre"]},"id":1}

Now, I have three different cases:
1- if the currently playing item is a "movie":
every thing works very efficient.

2- if the currently playing item is a "song":
the result set contains not only the currently playing song but all the songs of the album that contains the currently playing song.

3- if the currently playing item is a "tvShow episode":
the result set is empty like if there is nothing currently playing.


RE: getting currently playing item - Montellese - 2014-03-24

Try Player.GetItem.


RE: getting currently playing item - Muhammed Refaat - 2014-03-26

(2014-03-24, 19:33)Montellese Wrote: Try Player.GetItem.

"Method not found."


RE: getting currently playing item - Montellese - 2014-03-26

What version of XBMC are you using?