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)
default.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录