Kodi Community Forum

Full Version: Get xbmcgui Window properties
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Anyone familiair with getting (all) available Window properties to be read in Python?
I tried the following examples:

a = str(xbmcgui.Window(getCurrentWindowId()).getProperty('Addon.Description'))
b = str(xbmcgui.Window(getCurrentWindowId()).getProperty('Category'))
c = str(xbmcgui.Window(getCurrentWindowId()).getListItem('1'))
d = str(xbmcgui.Window(getCurrentWindowId()).getListItem(1))
e = str(xbmcgui.Window(getCurrentWindowId()).getListSize)
f = str(xbmcgui.Window(getCurrentWindowId()).getListItem('Icon'))

None of them seem to return anything.

Kind regards,
Jeroen
see: http://mirrors.xbmc.org/docs/python-docs...etProperty

i'm not sure what you're trying to accomplish though...
by default there aren't any window properties, at least not set by kodi.
they need to be set by an addon or skin first before you can get them
You can find the Python documentation links here.
For window properties it's this one.
Tanks ronie / BigNoid!

What I'm trying to accomplish is a deeplink to my skin settings.
By default, you need to navigate thru => Settings => Add ons => MyAddon => Configure.

I tried to make a shortcut like button, which does; ActivateWindow(addonsettings)
But this only works if the above path has been followed before. (It seems that variables are then set).
After reboot and direct selection kodi blanks out and hangs.

Therefore I'd want to catch these vars, so I can set them manually which should make my direct link usable.

So far I seem to be on a dead trail.
Only getting some <xbmcgui.ListItem object at 0x6157....> values

Isn't the addon.xml id of any use for direct approach?
<addon
id="skin.audi_rns"



If this is not going to work, I'll design a custom .xml, where at least I could try to reuse the getSettings / setSettings options as mentioned in the Python docs.
ActivateWindow(skinsettings) for skins and Addon.OpenSettings(id) for other add-ons
That easy!? Thanks!!

(Boy... was I on a wrong track..)