def listPage(page_id):
nav = getNav()
items = getPageItems(nav, page_id)
if len(items) == 1:
if 'path' in items[0].attrib:
listPath(items[0].attrib['path'])
return
for item in items:
url = ''
if item.tag == 'item':
url = common.build_url({'action': 'listPage', 'path': item.attrib['path']})
elif item.tag == 'section':
url = common.build_url({'action': 'listPage', 'id': item.attrib['id']})
addDir(item.attrib['label'], url)
if len(items) > 0:
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_NONE)
xbmcplugin.addSortMethod(handle=addon_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.endOfDirectory(addon_handle, cacheToDisc=True)
评论列表
文章目录