2024-10-31, 00:57
I think I understand the problem, but looking for confirmation.
What I have is a plugin that in typical fashion first creates a set of xbmcgui.Listitem(mylabel1,mylabel2) that are added as folder items xbmcplugin.addDirectoryItem(... , listitem, isFolder=True). Have also tried xbmcgui.Listitem().setLabel2(mylabel2).
In Kodi $INFO[ListItem.Label2] is empty.
I think that is because my sort method xbmcplugin.addSortMethod(handle, SORT_METHOD_NONE, labelMask, label2Mask) there isn't any defined label2Mask for the listitem.getLabel2() in the labelformatter.
It looks to me there needs to be an additional mask like "%g" that would return the item's label2. I did try setting both labelMask and label2Mask to "%L" and as expected both $INFO[ListItem.Label] and $INFO[ListItem.Label2] returned the item's label. I don't think folder listitems have any associated infotag? so I don't see any other info or property to set that I could use explicitly instead of $INFO[ListItem.Label2], not that I want to as that would require more complex skin layout coding.
scott s.
.
What I have is a plugin that in typical fashion first creates a set of xbmcgui.Listitem(mylabel1,mylabel2) that are added as folder items xbmcplugin.addDirectoryItem(... , listitem, isFolder=True). Have also tried xbmcgui.Listitem().setLabel2(mylabel2).
In Kodi $INFO[ListItem.Label2] is empty.
I think that is because my sort method xbmcplugin.addSortMethod(handle, SORT_METHOD_NONE, labelMask, label2Mask) there isn't any defined label2Mask for the listitem.getLabel2() in the labelformatter.
It looks to me there needs to be an additional mask like "%g" that would return the item's label2. I did try setting both labelMask and label2Mask to "%L" and as expected both $INFO[ListItem.Label] and $INFO[ListItem.Label2] returned the item's label. I don't think folder listitems have any associated infotag? so I don't see any other info or property to set that I could use explicitly instead of $INFO[ListItem.Label2], not that I want to as that would require more complex skin layout coding.
scott s.
.