addon.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:crossplatform_iptvplayer 作者: j00zek 项目源码 文件源码
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 ###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号