Newbie: Impossible to show label2
#1
Hello,

I am newbie, the problem is that I am not able to show label2 in a list Sad. 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 :-)
Reply
#2
as i can see there, you don't fill label2, you're using title , plot and genre.
so you can't show what you don't fill.
Reply
#3
ppic Wrote:as i can see there, you don't fill label2, you're using title , plot and genre.
so you can't show what you don't fill.

I don't think that is the problem, I fill label2, but I "rename" it as "Genre" because it seams it is needed to sort by the variable label2 to be shown...(xbmcplugin.SORT_METHOD_GENRE instead of xbmcplugin.SORT_METHOD_LABEL2 that is not supported...). I copied it from de SVN Repo Installer plugin...
Reply
#4
Maybe, there is another setting controlling label2HuhOo
Reply
#5
It's up to the skin firstly, and the sort method secondly to decide what is shown on the right hand side of a listing.

You don't have control over either of these, other than requesting what sort methods you want.
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
Reply
#6
What can I do?, I can see the second column using the SVN Repo Installer, my skin is PMIII, Why does it not work?:confused2:
Reply
#7
that's what a friend post to help me with this stuff:

you can't use this way in plugin:
Code:
listitem = xbmcgui.ListItem( "mon film", "01.01.2009", thumb, thumb )

here is the way you should:
Code:
listitem = xbmcgui.ListItem( "mon film", "", thumb, thumb )
#date        : string (%d.%m.%Y / 01.01.2009) - file date
infolabels = { "title": "mon film", "date": "01.01.2009" }
listitem.setInfo( type="Video", infoLabels=infolabels )

after that you can add your sort method:
Code:
def _add_sort_methods( self, OK ):
        if ( OK ) :
            handle = int( sys.argv[ 1 ] )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_DATE )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_VIDEO_TITLE )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_SIZE )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_GENRE )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_STUDIO )
            xbmcplugin.addSortMethod( handle, sortMethod=xbmcplugin.SORT_METHOD_PROGRAM_COUNT )
        self._end_of_directory( OK )
Reply

Logout Mark Read Team Forum Stats Members Help
Newbie: Impossible to show label20