ListItem questions and suggestion
#1
Hello,

When creating a ListItem, you have several params that you can set to be reflected in the UI/Skin. Some of the things aren't clear to me, so here are my questions:
- What is the difference between label1 and label2 (or how should skinner display them if supplied by addon)?
- What is the difference between iconImage and thumbnailImage (or how should skinner use them)?
- What is the reason for having (label1/label2/iconImage/thumbnailImage) as directly named paramter, then a named parameter for info (type, duration, title,...etc), and also have an extra properties to attach to the list? I know that group are the basic for all ListItem types, and the second may change depending on the type (video/picture/music), but why have the properties as well? cannot you merge them?

And I'll end with my suggestion:
It would be better for plugin API/ListItem to allow the programmer to specify a new custom type, along with the label and value pairs of each list item to be displayed in the UI by the skinner. Maybe allow up to 5, and have 3 of them as important (to be shown large in the skin), and 2 as less important (to be shown small or hidden). Then the skinner can read the label and display it with the given value on the skin, instead of forcing the plugin programmer to use video/music/picture, and they use the predefined info to be shown in the skin with the predefined labels.
For example I could write something like:
li = xbmcgui.ListItem(label1 = 'item label')
li.setInfo('mytype', {'Primary1': ['Developer', 'XBMC Team'], 'Primary2': ['Product': 'XBMC'], 'Secondary1': ['version', '11.0'] .....})
When the skin receive a non-defined type, like the one above, it should see if there are a named labels (like Primary#, and Secondary# etc), and if they are present, it should use the first item in the list as the label in the skin, and the second one as its value, and display it nicely as it would with video/music/picture info. This way, the skinner wouldn't be required to make a skin adjustment specifically for each plugin, rather the programmer can specify the labels/values/importance-order, and the skinner can fill them in the gap using the default skin layout.

Edit:
the suggested labeling can be substituted with String IDs for i18n or l10n instead of being hard-coded

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
ListItem questions and suggestion0