Can't really add/view label2 in listitem [Add-on development] - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Can't really add/view label2 in listitem [Add-on development] (/showthread.php?tid=377837) |
Can't really add/view label2 in listitem [Add-on development] - FrankWierd - 2024-06-06 I created a simple addon to test how to use label2, i want result like this image : Or something like youtube addon(left is title,and colored likes and views,on the right duration | date): But real result is this : And this is my python code :
addon.xml, if needed : Code: <?xml version="1.0" encoding="UTF-8"?> RE: Can't really add/view label2 in listitem [Add-on development] - DarrenHill - 2024-06-07 Thread moved to addon development RE: Can't really add/view label2 in listitem [Add-on development] - jbinkley60 - 2024-06-07 (2024-06-06, 20:18)FrankWierd Wrote: What's wrong with my code? Have you looked at the view mode ? That determines what is displayed by the skin, along with the sort sequence. Your result looks like a list view. Depending upon the skin, content type and such you may new to set the view mode. If you want to go that route I can should you some code for setting the view mode but typically it is easier just to set from the let panel manually and have Kodi remember it. Thanks, Jeff RE: Can't really add/view label2 in listitem [Add-on development] - Lunatixz - 2024-06-07 Label2 display is heavily depended on the skin you are using and the content type you set your plugin for. I don't recall offhand which content type will show label2 but one of them should. (Try 'Files')? RE: Can't really add/view label2 in listitem [Add-on development] - MoojMidge - 2024-06-08 (2024-06-06, 20:18)FrankWierd Wrote: Or something like youtube addon(left is title,and colored likes and views,on the right duration | date): As others have noted, the use of Label2 will vary depending on a number of factors including the skin being used, the selected view. The YouTube plugin does not use Label2 to achieve this type of display, it uses label masks as part of applying sort methods to the listings. https://github.com/anxdpanic/plugin.video.youtube/blob/master/resources/lib/youtube_plugin/kodion/context/xbmc/xbmc_context.py#L483 https://xbmc.github.io/docs.kodi.tv/master/kodi-base/d1/d32/group__python__xbmcplugin.html#ga85b3bff796fd644fb28f87b136025f40 |