List Item
#1
ok so i want to add more listitems and info labels

basically im just starting with ratings here is my code

Code:
def addDir(name,url,mode,iconimage,fanart,series,description,rating):
        u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)+"&fanart="+urllib.quote_plus(fanart)+"&series="+urllib.quote_plus(series)+"&description="+urllib.quote_plus(description)+"&rating="+urllib.quote_plus(rating)
        ok=True
        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
        liz.setInfo( type="Video", infoLabels={ "Title": name,"Plot":description,"rating":rating  } )
        liz.setProperty( "Fanart_Image", fanart )
        ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
        return ok


only problem it does not show the Rating!!
Reply
#2
Is the rating value you're passing in a float? Try this:
Code:
liz.setInfo( type="Video", infoLabels={ "Title": name,"Plot":description,"rating": 9.0 } )

If that works, then you just need to cast your rating value to a float
Reply
#3
nope nothing comes up at all

and to be honest when i right click i dont have the option

Show Information
Reply
#4
Have you called SetContent()?
Reply
#5
Ah no Huh

Do I do that In the adddir
Reply
#6
No, call it after you're done listing items. I have a hunch that ratings won't show unless the content type is set (haven't tested that though)
Reply
#7
Sorry my mistake I do have set content for the views
Reply
#8
im struggling to why its not showing also why when i right click i dont have

Show information ?
Reply
#9
Try the 'i' key, I think Show information is only in library mode or maybe a certain content type.
Reply
#10
yeah pressing the "i" shows information but rating still ot showing in there ?
Reply
#11
Maybe capitalize the R in rating?
Reply
#12
Nope not even if I done the 9.0 really really don't understand
Reply
#13
needs to be a string.
Reply
#14
Rating is in a string before it calls the add directory

funny thing is if I change

"Rating" to Genre

It will show up in genre
Reply
#15
anyone else have an opinion ?
Reply

Logout Mark Read Team Forum Stats Members Help
List Item0