2010-04-21, 19:19
Hello,
I am newbie, the problem is that I am not able to show label2 in a list . I have this function to add a folder to a list:
def addnewfolder( canal , accion , category , title , url , thumbnail , plot , label2 ):
listitem= xbmcgui.ListItem( label=title, label2=label2 , iconImage="DefaultFolder.png", thumbnailImage=thumbnail )
listitem.setInfo( type="Video", infoLabels={ "Title" : title, "Plot" : plot, "Genre" : label2 } )
itemurl = '%s?channel=%s&action=%s&category=%s&title=%s&url=%s&thumbnail=%s&plot=%s&label2=%s' % ( sys.argv[ 0 ] , canal , accion , urllib.quote_plus( category ) , urllib.quote_plus( title ) , urllib.quote_plus( url ) , urllib.quote_plus( thumbnail ) , urllib.quote_plus( plot ), urllib.quote_plus( label2 ) )
xbmcplugin.addDirectoryItem( handle = pluginhandle, url = itemurl , listitem=listitem, isFolder=True)
The end of the directory:
xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_GENRE)
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True)
Thanks for any help :-)
I am newbie, the problem is that I am not able to show label2 in a list . I have this function to add a folder to a list:
def addnewfolder( canal , accion , category , title , url , thumbnail , plot , label2 ):
listitem= xbmcgui.ListItem( label=title, label2=label2 , iconImage="DefaultFolder.png", thumbnailImage=thumbnail )
listitem.setInfo( type="Video", infoLabels={ "Title" : title, "Plot" : plot, "Genre" : label2 } )
itemurl = '%s?channel=%s&action=%s&category=%s&title=%s&url=%s&thumbnail=%s&plot=%s&label2=%s' % ( sys.argv[ 0 ] , canal , accion , urllib.quote_plus( category ) , urllib.quote_plus( title ) , urllib.quote_plus( url ) , urllib.quote_plus( thumbnail ) , urllib.quote_plus( plot ), urllib.quote_plus( label2 ) )
xbmcplugin.addDirectoryItem( handle = pluginhandle, url = itemurl , listitem=listitem, isFolder=True)
The end of the directory:
xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_GENRE)
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True)
Thanks for any help :-)