Building a Dynamic List
#1
Hi,

Im trying to work out the best way of building a list populated by dynamica content.

I have a Python Service in XBMC which is monitoring and storing data in a SQLITE database. I want to launch a new Window based on an existing skin and then load the data from the database into the list.

It seems somewhat bizarre to me that you have a skinning system and a python add on system that almost run side by side. I can create a custom window through skinning and launch it from ActivateWindow(id) which seems perfectly fine and natural. But it's not a program and will do nothing. There's no data.

What is the best way of doing this? Will I need to run a program instead?

I presume I either need to do RunAddon, or RunPlugin and draw the screen manually?

Or could I potentially still do an ActivateWindow(id) and then have an <onfocus> element to Run the Addon?

Simon
Reply
#2
I would recommend to learn facilities provided by Kodi Python API: https://codedocs.xyz/xbmc/xbmc/group__python.html

For building a listing you have 3 options: a plugin, a UI with Python-based Controls and a UI with XML layout (a mini-skin).
A plugin is good for media listings: you add items to a list and Kodi does the rest like displaying graphics and text info, UI event processing and such.
The 2 latter options allow you to fully (well, almost) customize your UI but you need to program everything yourself.

xbmcgui.Dialog class can also be used as a poor man's UI because it provide some basic interactive dialogs: confirmation boxes, a listing dialog, a text viewer and such.
Reply

Logout Mark Read Team Forum Stats Members Help
Building a Dynamic List0