ListItem displays plugin name as label, ignores setLabel - 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: ListItem displays plugin name as label, ignores setLabel (/showthread.php?tid=54280) |
ListItem displays plugin name as label, ignores setLabel - chuckles - 2009-07-09 I'm trying to create a list in my test plugin and I cant get listItem to display the desired label. It displays the name of the plugin as my label for all my items, even when I use static label text My code is as below Code: li=xbmcgui.ListItem( label='Test') Instead of displaying "Test" for listItem label it displays the name of my plugin Anybody got an idea why? - jmarshall - 2009-07-09 Which version of XBMC, as this was fixed a while back, but it keeps popping up (i.e. there's something you're doing differently than other plugins). If it's a recent SVN build, then I'll need a trac ticket (there probably already is one - have a search and let me know if there is) with an example plugin attached. Cheers, Jonathan - chuckles - 2009-07-12 jmarshall Wrote:Which version of XBMC, as this was fixed a while back, but it keeps popping up (i.e. there's something you're doing differently than other plugins). Apologies for the late reply I was using Windows Rev21496 I went back and tested on Babylon Beta1 and 9.04.1(repack2) All have the same result I couldn't find a trac ticket. I'll see if I can get the script down to its barebones and open a new ticket - chuckles - 2009-07-12 I have created a Ticket #6898. Here is the code here as well Code: #PLUGIN NAME: KidsTube - stacked - 2009-07-12 Code: #PLUGIN NAME: KidsTube You need to add a sortmethod. I added to your code above... - jmarshall - 2009-07-12 So with the sort method added you don't get the problem? Cheers, Jonathan - stacked - 2009-07-12 jmarshall Wrote:So with the sort method added you don't get the problem? I'm not sure if it works with all methods, but SORT_METHOD_LABEL seems to fix the problem. edit...I also tried SORT_METHOD_DATE and that works too. So I guess any sort method would fix the problem. - jmarshall - 2009-07-12 Interesting. Will see if I can figure out why this is necessary. - chuckles - 2009-07-12 stacked Wrote:You need to add a sortmethod. I added to your code above... I can confirm that this works. Thanks!!! - mkortstiege - 2009-07-12 FYI, r21647 will return a proper listing if there's no sortmethod set. |