def show_main_menu():
"""Show the main categories
This is typically: Shows, News, Movies, Live
"""
checkAccountChange()
html = callServiceApi('/')
processed = []
category_ids = common.parseDOM(html, 'a', ret='data-id')
for id in category_ids:
name = common.parseDOM(html, 'a', attrs={'data-id': id})[0]
href = common.parseDOM(html, 'a', attrs={'data-id': id}, ret='href')[0]
if id not in processed:
addDir(name, href, Mode.SUB_MENU, 'icon.png', data_id=id)
processed.append(id)
addDir('Clear cookies', '/', Mode.CLEAR_COOKIES, 'icon.png', isFolder=False)
xbmcplugin.endOfDirectory(thisPlugin)
评论列表
文章目录