本文整理汇总了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
示例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
示例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');
示例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')