Kodi Community Forum

Full Version: Retrieve current window ID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

for a couple of weeks now I have been searching for a solution but I haven't been able to find it yet. What I'm looking for is a way to keep track of the window that the user is watching. I want to build a remote that shows relevant buttons according to what is shown on the screen.

Is there anyway to retrieve the current Window ID or something similar?

Thanks for the help! Smile Big Grin
I don't think that this is possible using json-rpc

However you can try send messages to the eventserver over udp and use a custom keymap file to achieve what you are looking for. This is what I am doing in Music Pump XBMC Remote. But this doesn't solve the problem of showing the proper button on the remote depending on the window showed on xbmc

https://github.com/xbmc/xbmc/tree/master...entClients
http://wiki.xbmc.org/?title=EventServer
You can try:
Code:
{"jsonrpc":"2.0","method":"GUI.GetProperties","params":{"properties":["currentwindow"]},"id":1}
Nice must have missed that this was added in frodo. But you will need to poll xbmc every second or so to update your remote layout. Getting an event when the window changes would be far better than having to poll
(2013-10-10, 17:55)Kabooga Wrote: [ -> ]You can try:
Code:
{"jsonrpc":"2.0","method":"GUI.GetProperties","params":{"properties":["currentwindow"]},"id":1}

Sir, you are amazing! Big Grin Thank you ever so much!!!!