How are Containers/ListItems initialized?
#1
Hi,

I'm a newbie in Kodi skin development and I would like to understand how the Containers/ListItems are initialized, but I haven't find any clear explanation on the Kodi's development site or with google.

Basically these are my understandings/assumptions:
1.) The ActivateWindow function's first parameter refers to an a window object (e.g. MyVideoNav.xml), which is initialized by a list which is given in the second parameter.
2.) Each window has a default Container object, and when the Container is used without ID parameter, this list (obtained as ActivateWindow's second parameter) will be referred (e.g. <label>$INFO[Container.SortMethod]</label>).
3.) The ListItem is same: when the ListItem object is used alone without Container reference, it refers to the list elements of the default Container object. (e.g. <visible>!String.IsEmpty(ListItem.Year)</visible>)
4.) Each window has only one default container, so it is not feasible to list for example the videos and the musics on same window.
5.) It is feasible to use more Containers on one window, but in this case it is needed to use IDs of the controls (e.g. <label>$INFO[Container(9001).ListItem.Rating(imdb),,/10]</label>)

My questions are:
* Are these assumptions correct? Please correct me if something is wrong in the above points.
* Some IDs are missing in the whole skin, so for example I don't know what the Container(9001) means. My assumption is there are some built-in containers in the Kodi, and the 9001 refers to that list. There are some other IDs also (e.g. 2001, 2002, 2003, 2004) what I cannot find anywhere. What are these IDs? Where can I found a list about meaning of these IDs?

Thank you for any help!

Thank you,
Zsolt
Reply
#2
Not an expert, but keep in mind there are "media" windows and "non-media" windows.  Media windows have defined <views>, historically in the range 50-59, but I guess now can be anything, though range starting with 500 seems common practice.

The media windows have a default view which is a container control.  If you define additional views, each is a container object.  The view control mechanism can be used to set visibility of the current view container id.  I'm pretty sure calls to $INFO[ListItem.*] will always  reference the current view container.

Skinners can define additional containers which are not "views".  Use of these containers is via the "focus" mechanism.  Unfocused containers can be referenced via $INFO[Container(id).ListItem.*]

"9001" and "9000" are typically skinner-defined and historically have been used for menus.  Keep in mind they can be defined in <include> blocks so you need to search all the skin include files.

The pre-defined containers (and other controls) are listed in here:  List_of_Built_In_Controls (wiki)

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
How are Containers/ListItems initialized?0