default.py 文件源码

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

项目:nuodtayo.tv 作者: benaranguren 项目源码 文件源码
def addDir(name, url, mode, thumbnail, page=0, isFolder=True,
           data_id=0, page_item=0, **kwargs):
    u = ('%s?url=%s&mode=%s&name=%s&page=%s' \
         '&thumbnail=%s&data_id=%s&page_item=%s' % (
            sys.argv[0],
            urllib.quote_plus(url),
            str(mode),
            urllib.quote_plus(name),
            str(page),
            urllib.quote_plus(thumbnail),
            str(data_id),
            str(page_item)
        ))
    liz = xbmcgui.ListItem(name, iconImage="DefaultFolder.png",
                           thumbnailImage=thumbnail)
    liz.setInfo( type="Video", infoLabels={ "Title": name } )
    for k, v in kwargs.iteritems():
        if k == 'listProperties':
            for listPropertyKey, listPropertyValue in v.iteritems():
                liz.setProperty(listPropertyKey, listPropertyValue)
        if k == 'listInfos':
            for listInfoKey, listInfoValue in v.iteritems():
                liz.setInfo(listInfoKey, listInfoValue)

    return xbmcplugin.addDirectoryItem(handle=thisPlugin,
                                       url=u,
                                       listitem=liz,
                                       isFolder=isFolder)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号