2017-12-29, 00:48
I'm writing a video addon and for some reason when listing thumbnails for the available videos I only see 2 viewtypes (this is using the Estuary theme) I thought setting the info type to 'videos' would allow for all assigned video viewtypes to be selectable, but I'm guessing I'm thinking wrong? I've included the function below, any pointers would be appreciated.
python:
def addMenuItems(details):
for detail in details:
u=sys.argv[0]+"?{}".format(urllib.urlencode(detail['details']))
list_item = xbmcgui.ListItem(label=detail['details']['title'], thumbnailImage=detail['details']['thumb'])
if "type" in detail['details']:
list_item.setInfo(detail['details']['type'], detail['info'])
if "art" in detail:
list_item.setArt(detail['art'])
if "streaminfo" in detail:
list_item.setStreamInfo(detail['streaminfo'])
list_item.setProperty('IsPlayable', str(detail['isPlayable']))
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=list_item,isFolder=detail['isFolder'])
if "view" in details:
xbmc.executebuiltin('Container.SetViewMode(%d)' % int(details['view']))
xbmcplugin.endOfDirectory(int(sysarg))