main.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:plugin.video.areena 作者: hirsivaja 项目源码 文件源码
def show_menu():
    if get_app_id() == '' or get_app_key() == '' or get_secret_key() == '':
        return show_credentials_needed_menu()
    listing = []
    tv_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32031)))
    tv_url = '{0}?action=categories&base=5-130'.format(_url)
    listing.append((tv_url, tv_list_item, True))
    live_tv_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32067)))
    live_tv_url = '{0}?action=live'.format(_url)
    listing.append((live_tv_url, live_tv_list_item, True))
    radio_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32032)))
    radio_url = '{0}?action=categories&base=5-200'.format(_url)
    listing.append((radio_url, radio_list_item, True))
    search_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32007)))
    search_url = '{0}?action=search'.format(_url)
    listing.append((search_url, search_list_item, True))
    favourites_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32025)))
    favourites_url = '{0}?action=favourites'.format(_url)
    listing.append((favourites_url, favourites_list_item, True))
    open_settings_list_item = xbmcgui.ListItem(label='[COLOR {0}]{1}[/COLOR]'.format(
        get_color('menuItemColor'), get_translation(32040)))
    open_settings_url = '{0}?action=settings'.format(_url)
    listing.append((open_settings_url, open_settings_list_item, True))
    # Add our listing to Kodi.
    xbmcplugin.addDirectoryItems(_handle, listing, len(listing))
    # Add a sort method for the virtual folder items (alphabetically, ignore articles)
    xbmcplugin.addSortMethod(_handle, xbmcplugin.SORT_METHOD_NONE)
    # Finish creating a virtual folder.
    xbmcplugin.endOfDirectory(_handle)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号