default.py 文件源码

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

项目:plugin.audio.euskarazko-irratiak 作者: aldatsa 项目源码 文件源码
def list_podcast_radios(radios):
    radio_list = []

    # iterate over the contents of the list of radios
    for radio in sorted(radios, key=operator.itemgetter('name')):
        url = build_url({'mode': 'podcasts-radio', 'foldername': radio['name'], 'url': radio['url'], 'name': radio['name']})
        li = xbmcgui.ListItem(radio['name'], iconImage='DefaultFolder.png')
        radio_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, radio_list, len(radio_list))

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


问题


面经


文章

微信
公众号

扫码关注公众号