def prepareKODIurlsList(urlsList, videoName):
exec(urlsList)
for item in UrlsList:
list_item = xbmcgui.ListItem(label = item['name'])
#list_item.setArt({'thumb': VIDEOS[category][0]['thumb'],
# 'icon': VIDEOS[category][0]['thumb'],
# 'fanart': VIDEOS[category][0]['thumb']})
# Set additional info for the list item.
# Here we use a category name for both properties for for simplicity's sake.
list_item.setInfo('video', {'title': videoName}) # http://mirrors.xbmc.org/docs/python-docs/15.x-isengard/xbmcgui.html#ListItem-setInfo
list_item.setProperty('IsPlayable', 'true')
myID = item['id']
myUrl = item['url']
myLevel = ADDON.getSetting("currenLevel")
is_folder = False
url = get_url(action = 'playUrl',
id = myID,
level = myLevel,
urlNeedsResolve=item['urlNeedsResolve'],
url=myUrl,
name=videoName) # Create a URL for a plugin recursive call.
if ADDON.getSetting("PlayerMode") == "2":
list_item.setArt({'thumb': xbmc.translatePath('special://home/addons/plugin.video.IPTVplayer/resources/icons/download.png')})
xbmcplugin.addDirectoryItem(ADDON_handle, url, list_item, is_folder)
myLog('action=playUrl id=%s level=%s' % (myID,myLevel))
# 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.
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ### MAIN FUNCTION ###
评论列表
文章目录