Python xbmcplugin.setPluginFanart() Examples
The following are 4
code examples of xbmcplugin.setPluginFanart().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
xbmcplugin
, or try the search function
.
Example #1
Source File: plugintools.py From tvalacarta with GNU General Public License v3.0 | 5 votes |
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)
Example #2
Source File: plugintools.py From tvalacarta with GNU General Public License v3.0 | 5 votes |
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)
Example #3
Source File: plugintools.py From pelisalacarta-ce with GNU General Public License v3.0 | 5 votes |
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)
Example #4
Source File: default.py From filmkodi with Apache License 2.0 | 5 votes |
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)