Directly Update a Widget ControlList
#1
Hello

I've recently been learning how to do stuff in kodi/python and I built my own addon to provide items to a widget. This works fine but its a bit slow reloading and I was wondering if the widgets can be directly updated instead of having to be mediated through an addon?

If been trying some preliminary code to get the list items out of the widget but every time I try to directly access the control "ControlList" kodi crashes. Or I keep getting told that attributes dont exist, when they really should.

list = xbmcgui.Window(10000).getControl(1510)
xbmc.log(str(list.getLabel()), level=2)
Doesnt Work

xbmc.log(str(bmcgui.Window(10000).Control(1510).getLabel()), level=2)
doesnt work

xbmc.sleep(2500)
xbmc.log(str(list.getListItem(1).getproperty('Label')), level=2)
KODI CRASHES!!

list = xbmcgui.Window(10000).getControl(1510)
list.addItem(list_item)
KODI CRASHES!!

Is it possible to update a widget in this manner or do widgets not work like that?
The documentation and forum posts I have been able to find are incredibly vague when it comes to widgets.
Reply
#2
favourites://
     
      <param name="visible" value="!Integer.IsGreater(Container(14100).NumItems,0) + !Container(14100).IsUpdating"/>
      https://kodi.wiki/view/List_of_boolean_conditions

have a read of the Add-on:Skin Widgets plugin
Reply

Logout Mark Read Team Forum Stats Members Help
Directly Update a Widget ControlList0