I have created two directories for my xmbc/kodi addon with thumbnails but it doesn't show the thumbnails and both directories show below each other as text(instead of showing the directories in one row with thumbnails).I placed the thumbs in resources/images folder.
could any one help me fix this problem or point me to beginner tutorial on how to display the directories with its thumbnails in rows of 5.Thanks in advance.
import urllib,urllib2,re,xbmcplugin,xbmcgui,sys,os,xbmc,xbmcaddon
addonPath = xbmcaddon.Addon().getAddonInfo("path")
addonArt = os.path.join(addonPath,'resources/images')
def CATEGORIES():
addDir('fruits' ,'CCats' ,14,addonArt+'/fruits.png')
addDir('cars' ,'/b/series.html' ,6,addonArt+'/cars.png')
def addDir(name,url,mode,iconimage):
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
ok=True
liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
liz.setInfo( type="Video", infoLabels={ "Title": name } )
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
return ok
if mode==None or url==None or len(url)<1:
print ""
CATEGORIES()
xbmcplugin.endOfDirectory(int(sys.argv[1]))