本文整理汇总了Python中xbmcplugin.setPluginFanart方法的典型用法代码示例。如果您正苦于以下问题:Python xbmcplugin.setPluginFanart方法的具体用法?Python xbmcplugin.setPluginFanart怎么用?Python xbmcplugin.setPluginFanart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbmcplugin
的用法示例。
在下文中一共展示了xbmcplugin.setPluginFanart方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_item
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import setPluginFanart [as 别名]
def add_item( action="" , title="" , plot="" , url="" , thumbnail="" , fanart="" , show="" , episode="" , extra="", category="", page="", info_labels = None, context_menu_items = [] , isPlayable = False , folder=True ):
_log("add_item action=["+action+"] title=["+title+"] url=["+url+"] thumbnail=["+thumbnail+"] fanart=["+fanart+"] show=["+show+"] episode=["+episode+"] extra=["+extra+"] category=["+category+"] page=["+page+"] isPlayable=["+str(isPlayable)+"] folder=["+str(folder)+"]")
listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail )
if info_labels is None:
info_labels = { "Title" : title, "FileName" : title, "Plot" : plot }
listitem.setInfo( "video", info_labels )
if len(context_menu_items)>0:
listitem.addContextMenuItems ( context_menu_items, replaceItems=False)
if fanart!="":
listitem.setProperty('fanart_image',fanart)
xbmcplugin.setPluginFanart(int(sys.argv[1]), fanart)
if url.startswith("plugin://"):
itemurl = url
listitem.setProperty('IsPlayable', 'true')
xbmcplugin.addDirectoryItem( handle=int(sys.argv[1]), url=itemurl, listitem=listitem, isFolder=folder)
elif isPlayable:
listitem.setProperty("Video", "true")
listitem.setProperty('IsPlayable', 'true')
itemurl = '%s?action=%s&title=%s&url=%s&thumbnail=%s&fanart=%s&plot=%s&extra=%s&category=%s&page=%s' % ( sys.argv[ 0 ] , action , urllib.quote_plus( title ) , urllib.quote_plus(url) , urllib.quote_plus( thumbnail ) , urllib.quote_plus( fanart ) , urllib.quote_plus( plot ) , urllib.quote_plus( extra ) , urllib.quote_plus( category ) , urllib.quote_plus( page ))
xbmcplugin.addDirectoryItem( handle=int(sys.argv[1]), url=itemurl, listitem=listitem, isFolder=folder)
else:
itemurl = '%s?action=%s&title=%s&url=%s&thumbnail=%s&fanart=%s&plot=%s&extra=%s&category=%s&page=%s' % ( sys.argv[ 0 ] , action , urllib.quote_plus( title ) , urllib.quote_plus(url) , urllib.quote_plus( thumbnail ) , urllib.quote_plus( fanart ) , urllib.quote_plus( plot ) , urllib.quote_plus( extra ) , urllib.quote_plus( category ) , urllib.quote_plus( page ))
xbmcplugin.addDirectoryItem( handle=int(sys.argv[1]), url=itemurl, listitem=listitem, isFolder=folder)
示例2: addDir
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import setPluginFanart [as 别名]
def addDir(self, name, mode, autoplay, icon, isPlayable = True, category='', murl=''):
#print("Dane",name, mode, autoplay, icon, isPlayable)
#u=sys.argv[0] + "?mode=" + str(mode) + "&category="+ category + "&murl="+ murl + "&name="+ name
u=sys.argv[0] + "?mode=" + str(mode)
if icon != False:
icon = os.path.join(ptv.getAddonInfo('path'), "images/") + icon + '.png'
else:
icon = "DefaultVideoPlaylists.png"
liz=xbmcgui.ListItem(name, iconImage=icon, thumbnailImage='')
if autoplay and isPlayable:
liz.setProperty("IsPlayable", "true")
liz.setInfo( type="Video", infoLabels={ "Title": name } )
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u,listitem=liz, isFolder= not autoplay)
#xbmcplugin.setPluginFanart(int(sys.argv[1]), common.Paths.pluginFanart1)