1

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]))
user1788736
  • 2,727
  • 20
  • 66
  • 110
  • http://kodi.wiki/view/HOW-TO:HelloWorld_addon I'd start by cloning it, and then slowly changing it to match your application – Penz Jan 17 '16 at 22:18

0 Answers0