2011-03-26, 15:38
carmenm Wrote:I have a question. I am trying to send a switch show OSD command when playing.
I must use htttp interface as json doesnt implement this yet.
But my proplem is that using Action(24) it locks the GUI.
And i dont see a Key that would switch between show and hide OSD
Does anyone see a way to do that in JSON or HTTP?
Also to get nowplaying info (label, year, tagline ...) i read somewhere that i could use System.GetInfoLabels. Am I wrong? If not what parameter to use. If yes how i can i get it.
Thanks
I have recently switched to using SendKey instead of raw actions via HTTP. I like it better as it preserves the sound effects and the keys are mapped via the keyboard.xml depending on the context (and are remappable by the end user). So if you use sendkey you can just send the OSD keycode.
I am also using System.GetInfoLabels, I use the ListItem.xxx labels to get info when a movie is not playing and the VideoPlaylist.GetItems when the videoplayer is active. GetInfoLablels is mostly blank when a movie is playing and unfortunately I think there is currently a bug and some of the info is not returned via the VideoPlaylist.GetItems labels (like Thumb). I haven't narrowed it down yet.
There is also System.GetInfoLabels VideoPlayer.xxx labels, I am not sure if/how well they work. If I remember right I couldn't get the thumbnail there either using VideoPlayer.Cover. All valid infolabels can be found here.
Code:
[b]SendKey command for OSD[/b]
http://xbox/xbmcCmds/xbmcHttp?command=SendKey(0xF00D)
[b]GetInfoLabels/VideoPlaylist.GetItems[/b]
{"jsonrpc":"2.0","method":"System.GetInfoLabels","params":["Listitem.Title","Listitem.Season","Listitem.Plot","Listitem.Duration"],"id":1}
{"jsonrpc":"2.0","method":"VideoPlaylist.GetItems","params":{"fields":["title","season","episode","plot","duration","showtitle"]},"id":1}