def show_matches_list(self, game_date, _for):
"""
Creates the KODI list items with the contents of available matches
for a given date
:param game_date: Chosen event-lane
:type game_date: string
:param _for: Chosen sport
:type _for: string
"""
self.utils.log('Matches list: ' + _for)
addon_data = self.utils.get_addon_data()
plugin_handle = self.plugin_handle
epg = self.get_epg(_for)
items = epg.get(game_date)
for item in items:
url = self.utils.build_url(
{'hash': item.get('hash'), 'date': game_date, 'for': _for})
list_item = xbmcgui.ListItem(label=item.get('title'))
list_item.setProperty('fanart_image', addon_data.get('fanart'))
xbmcplugin.addDirectoryItem(
handle=plugin_handle,
url=url,
listitem=list_item,
isFolder=True)
xbmcplugin.addSortMethod(
handle=plugin_handle,
sortMethod=xbmcplugin.SORT_METHOD_NONE)
xbmcplugin.endOfDirectory(plugin_handle)
ContentLoader.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录