当前位置: 首页>>代码示例>>Python>>正文


Python Addon.get_fanart方法代码示例

本文整理汇总了Python中t0mm0.common.addon.Addon.get_fanart方法的典型用法代码示例。如果您正苦于以下问题:Python Addon.get_fanart方法的具体用法?Python Addon.get_fanart怎么用?Python Addon.get_fanart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t0mm0.common.addon.Addon的用法示例。


在下文中一共展示了Addon.get_fanart方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_addons_that_have_favorites

# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import get_fanart [as 别名]
 def get_addons_that_have_favorites(self):
 
     addons = []
 
     sql_select = "SELECT DISTINCT addon_id FROM favorites ORDER BY addon_id"
 
     self.dbcur.execute(sql_select)
 
     for matchedrow in self.dbcur.fetchall():
     
         match = dict(matchedrow)
         
         try:
             tmp_addon_id = match['addon_id']
             tmp_addon = Addon(tmp_addon_id)
             tmp_addon_name = tmp_addon.get_name()
             tmp_addon_img = tmp_addon.get_icon()                
             tmp_addon_fanart = tmp_addon.get_fanart() 
         except:
             tmp_addon_name = tmp_addon_id
             tmp_addon_img = ''          
             tmp_addon_fanart = ''
             pass
         
         tmp_addon_dtl = {'title' : tmp_addon_name, 'id' : tmp_addon_id, 'img':tmp_addon_img, 'fanart':tmp_addon_fanart}
         
         addons.append(tmp_addon_dtl)
         
     return addons
开发者ID:ArchUser,项目名称:Kasiks-Repo,代码行数:31,代码来源:favorites.py

示例2: getserial

# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import get_fanart [as 别名]
# imports to work. We do not import modules yet but this is here
# for future developments.

sys.path.insert( 0,os.path.join( ovpath, 'resources', 'libs' ) )

# import of OV modules
import updatefromremote
import ua

# update
#updatefromremote.begin()

# global variables used within many functions

pluginhandle=int(sys.argv[1])
fanart = addon.get_fanart()

def getserial():

        cpuserial = "0000000000000000"
        try:
            f = open('/proc/cpuinfo','r')
            for line in f:
                if line[0:6]=='Serial':
                    cpuserial = line[10:26]
            f.close()
        except:
            cpuserial = "ERROR000000000"

        return cpuserial
开发者ID:OpenElf,项目名称:openviewhelper,代码行数:32,代码来源:default.py

示例3: addst

# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import get_fanart [as 别名]
### 
### ############################################################################################################
### ############################################################################################################
### ############################################################################################################
##Notes-> I placed these here so that they would be before the stuff that they use during setup.
def addst(r,s=''): return _addon.get_setting(r)   ## Get Settings
def addpr(r,s=''): return _addon.queries.get(r,s) ## Get Params
def tfalse(r,d=False): ## Get True / False
	if   (r.lower()=='true' ): return True
	elif (r.lower()=='false'): return False
	else: return d
##### Paths #####
### # ps('')
_addonPath	=xbmc.translatePath(_plugin.getAddonInfo('path'))
_artPath		=xbmc.translatePath(os.path.join(_addonPath,ps('_addon_path_art')))
_datapath 	=xbmc.translatePath(_addon.get_profile()); _artIcon		=_addon.get_icon(); _artFanart	=_addon.get_fanart()
##### /\ ##### Paths #####
##### Important Functions with some dependencies #####
def art(f,fe=ps('default_art_ext')): return xbmc.translatePath(os.path.join(_artPath,f+fe)) ### for Making path+filename+ext data for Art Images. ###
##### /\ ##### Important Functions with some dependencies #####
##### Settings #####
_setting={}; 
##Notes-> options from the settings.xml file.
_setting['enableMeta']	=	_enableMeta			=tfalse(addst("enableMeta"))
_setting['debug-enable']=	_debugging			=tfalse(addst("debug-enable")); _setting['debug-show']	=	_shoDebugging		=tfalse(addst("debug-show"))
_setting['label-empty-favorites']=tfalse(addst('label-empty-favorites'))
##Notes-> some custom settings.
#_setting['meta.movie.domain']=ps('meta.movie.domain'); _setting['meta.movie.search']=ps('meta.movie.search')
#_setting['meta.tv.domain']   =ps('meta.tv.domain');    _setting['meta.tv.search']   =ps('meta.tv.search')
#_setting['meta.tv.page']=ps('meta.tv.page'); _setting['meta.tv.fanart.url']=ps('meta.tv.fanart.url'); 
#_setting['meta.tv.fanart.url2']=ps('meta.tv.fanart.url2'); 
开发者ID:HIGHWAY99,项目名称:plugin.video.example,代码行数:33,代码来源:default.py

示例4: ps

# 需要导入模块: from t0mm0.common.addon import Addon [as 别名]
# 或者: from t0mm0.common.addon.Addon import get_fanart [as 别名]
### ############################################################################################################
__plugin__=ps('__plugin__'); __authors__=ps('__authors__'); __credits__=ps('__credits__'); _addon_id=ps('_addon_id'); _domain_url=ps('_domain_url'); _database_name=ps('_database_name'); _plugin_id=ps('_addon_id')
_database_file=os.path.join(xbmc.translatePath("special://database"),ps('_database_name')+'.db'); 
### 
_addon=Addon(ps('_addon_id'), sys.argv); addon=_addon; _plugin=xbmcaddon.Addon(id=ps('_addon_id')); cache=StorageServer.StorageServer(ps('_addon_id'))
### ############################################################################################################
### ############################################################################################################
### ############################################################################################################
##### Paths #####
### # ps('')
_addonPath	=xbmc.translatePath(_plugin.getAddonInfo('path'))
_artPath		=xbmc.translatePath(os.path.join(_addonPath,ps('_addon_path_art')))
_datapath 	=xbmc.translatePath(_addon.get_profile()); _artIcon		=_addon.get_icon(); 
#try:		_artFanart	=ps('_fanart_url')
#except:	_artFanart	=_addon.get_fanart()
_artFanart	=_addon.get_fanart()
##### /\ ##### Paths #####
##### Important Functions with some dependencies #####
def art(f,fe=ps('default_art_ext')): return xbmc.translatePath(os.path.join(_artPath,f+fe)) ### for Making path+filename+ext data for Art Images. ###
##### /\ ##### Important Functions with some dependencies #####
##### Settings #####
_setting={}; _setting['enableMeta']	=	_enableMeta			=tfalse(addst("enableMeta"))
_setting['debug-enable']=	_debugging			=tfalse(addst("debug-enable")); _setting['debug-show']	=	_shoDebugging		=tfalse(addst("debug-show"))
#_setting['meta.tv.page']=ps('meta.tv.page'); _setting['meta.tv.fanart.url']=ps('meta.tv.fanart.url'); _setting['meta.tv.fanart.url2']=ps('meta.tv.fanart.url2'); 
_setting['label-empty-favorites']=tfalse(addst('label-empty-favorites'))
CurrentPercent=0; CancelDownload=False

##### /\ ##### Settings #####
##### Variables #####
_art404=art('notfound','.gif')
_art150=art('notfound','.gif')
开发者ID:HIGHWAY99,项目名称:plugin.audio.thefunkstation,代码行数:33,代码来源:default.py


注:本文中的t0mm0.common.addon.Addon.get_fanart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。