def __add_static_folders(self, statics, sport):
"""
Adds static folder items to Kodi (if available)
:param statics: All static entries
:type statics: dict
:param sport: Chosen sport
:type sport: string
"""
if statics.get(sport):
static_lanes = statics.get(sport)
if static_lanes.get('categories'):
lanes = static_lanes.get('categories')
for lane in lanes:
url = self.utils.build_url({
'for': sport,
'static': True,
'lane': lane.get('id')})
list_item = xbmcgui.ListItem(label=lane.get('name'))
xbmcplugin.addDirectoryItem(
handle=self.plugin_handle,
url=url,
listitem=list_item,
isFolder=True)
ContentLoader.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录