directory listing and label2 without sort method

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
aaron.rogers Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #1
my addon creates a directory listing, and i want to show some extra info. like this:

Code:
handle = int(sys.argv[1])
for i in range(15):
    listitem = xbmcgui.ListItem( label="Label %s" % i , label2="Info %s" % i)
    xbmcplugin.addDirectoryItem( handle=handle, url="", listitem=listitem, isFolder=False )
xbmcplugin.addSortMethod( handle=handle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
xbmcplugin.endOfDirectory( handle=handle, succeeded=True )

but label2 only shows up when i add a sort method.

Code:
handle = int(sys.argv[1])
for i in range(15):
    listitem = xbmcgui.ListItem(label="Label %s" % i , label2="Info %s" % i)
    listitem.setInfo( type="video", infoLabels={"Title":"Label %s" % i,"Genre":"Info %s" % i} )
    xbmcplugin.addDirectoryItem( handle=handle, url="", listitem=listitem, isFolder=False )
xbmcplugin.addSortMethod( handle=handle, sortMethod=xbmcplugin.SORT_METHOD_GENRE )
xbmcplugin.endOfDirectory( handle=handle, succeeded=True )

is there a way to show label2 without defining a sort method?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
How label2 displays is somewhat defined by the sortmethod in XBMC. By specifying a sortmethod in your addon, you override the default sortmethods (and thus the default assigning of label2). This may then be skin-specific as not all skins will display label2 (some will prefer to display some other labels, depending on the view type).

Check what the sortmode in XBMC is if you don't specify it in your addon.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote