2016-11-21, 09:06
Hello All,
I'm currently developing my own Home Dashboard. One of the things that I am working on doing is you can create pages for the rooms in our home and view whats going on in each room. One of the items I'd like to display is if there is currently a Kodi setup in the room I'd like to display what is currently playing on that device. I am currently able to pull video information using the following JSON Query.
I'm able to pull what I need. What I want to do however is based off Type, which seems to be available from http://kodi.wiki/view/JSON-RPC_API/v6#List.Item.Base . However I can't seem to figure out how to pull that bit of information. I'd like to use it in my PHP code so that based on what this returns I can format appropriately for Music/Movie/TV Show. I've tried changing the formatting a few times, however I believe I may be missing something.
I've tried the following:
Any help in pointing me to what I am missing here would be greatly appreciated .
I'm currently developing my own Home Dashboard. One of the things that I am working on doing is you can create pages for the rooms in our home and view whats going on in each room. One of the items I'd like to display is if there is currently a Kodi setup in the room I'd like to display what is currently playing on that device. I am currently able to pull video information using the following JSON Query.
Code:
{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "genre", "year", "rating", "playcount", "fanart", "director", "trailer", "tagline", "plot", "plotoutline", "originaltitle", "lastplayed", "writer", "studio", "mpaa", "cast", "country", "imdbnumber", "premiered", "runtime", "streamdetails", "votes", "thumbnail", "tag", "art", "sorttitle", "dateadded", "season", "episode"], "playerid": 1 }, "id": "VideoGetItem"}
I'm able to pull what I need. What I want to do however is based off Type, which seems to be available from http://kodi.wiki/view/JSON-RPC_API/v6#List.Item.Base . However I can't seem to figure out how to pull that bit of information. I'd like to use it in my PHP code so that based on what this returns I can format appropriately for Music/Movie/TV Show. I've tried changing the formatting a few times, however I believe I may be missing something.
I've tried the following:
Code:
{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["type"], "playerid": 1}, "id": "List.Item.Base"} and when I go to it in the URL I get the following response:
{"error":{"code":-32602,"data":{"method":"Player.GetItem","stack":{"message":"array element at index 0 does not match","name":"Item.Fields.Base","property":{"message":"Received value does not match any of the defined enum values","type":"string"},"type":"array"}},"message":"Invalid params."},"id":"List.Item.Base","jsonrpc":"2.0"}
Any help in pointing me to what I am missing here would be greatly appreciated .