def SelectHost():
for host in HostsList:
if ADDON.getSetting(host[0]) == 'true':
hostName = host[1].replace("https:",'').replace("http:",'').replace("/",'').replace("www.",'')
hostImage = '%s/icons/%s.png' % (ADDON.getSetting("kodiIPTVpath"), host[0])
list_item = xbmcgui.ListItem(label = hostName)
list_item.setArt({'thumb': hostImage,})
list_item.setInfo('video', {'title': hostName, 'genre': hostName})
url = get_url(action='startHost', host=host[0])
myLog(url)
is_folder = True
# Add our item to the Kodi virtual folder listing.
xbmcplugin.addDirectoryItem(ADDON_handle, url, list_item, is_folder)
# Add a sort method for the virtual folder items (alphabetically, ignore articles)
xbmcplugin.addSortMethod(ADDON_handle, xbmcplugin.SORT_METHOD_LABEL_IGNORE_THE)
# Finish creating a virtual folder.
xbmcplugin.endOfDirectory(ADDON_handle)
return
评论列表
文章目录