default.py 文件源码

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

项目:plugin.audio.euskarazko-irratiak 作者: aldatsa 项目源码 文件源码
def list_podcast_programs(programs):
    program_list = []

    # iterate over the contents of the list of programs
    for program in programs:
        url = build_url({'mode': 'podcasts-radio-program', 'foldername': urllib.quote(program['name'].encode('utf8')), 'url': program['url'], 'name': urllib.quote(program['name'].encode('utf8')), 'radio': program['radio']})
        li = xbmcgui.ListItem(program['name'], iconImage='DefaultFolder.png')
        program_list.append((url, li, True))

    # add list to Kodi per Martijn
    # http://forum.kodi.tv/showthread.php?tid=209948&pid=2094170#pid2094170
    xbmcplugin.addDirectoryItems(addon_handle, program_list, len(program_list))

    # set the content of the directory
    xbmcplugin.setContent(addon_handle, 'songs')
    xbmcplugin.endOfDirectory(addon_handle)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号