本文整理汇总了Python中urlresolver.display_settings函数的典型用法代码示例。如果您正苦于以下问题:Python display_settings函数的具体用法?Python display_settings怎么用?Python display_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_settings函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mode_subcheck
def mode_subcheck(mode='',site='',section='',url=''):
try: debob({'mode':mode,'url':url,'title':addpr('title','')})
except: pass
if (mode=='SectionMenu'): MenuSection()
elif (mode=='') or (mode=='main') or (mode=='MainMenu'): MenuSection()
elif (mode=='SubMenu'): MenuSub()
elif (mode=='MenuSpecial'): MenuSpecial(url)
elif (mode=='MenuDevFeatured'): MenuDevFeatured()
elif (mode=='MenuBrowse'): MenuBrowse()
elif (mode=='MenuTopBar'): MenuTopBar()
## #MenuListChannels(Url,Page='',TyPE='js',idList='[]', csrfToken='')
elif (mode=='ListShows'): MenuListChannels(url,addpr('page',''),addpr('type',''),addpr('idlist',''),addpr('csrfToken',''))
elif (mode=='BrowseCat'): MenuListChannels(mainSite+"/app/topbar.php?s=vl%s" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='BrowseCat2'): MenuListChannels(mainSite+"/app/topbar.php?s=%s" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='BrowseCat3'): MenuListChannels(mainSite+"/browse/%s?a=mvn" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='BrowseCat4'): MenuListChannels(mainSite+"/browse/%s" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='Search'): DoSearch(addpr('title',''),url)
elif (mode=='History101'): MenuHistory101()
elif (mode=='PlayLiveStream'): PlayLiveStream(url,addpr('title',''),addpr('img',''),addpr('channel',''),addpr('roomid',''),addpr('roomslug',''),addpr('plot',''),addpr('live',''),addpr('streamurl',''),addpr('streamkey',''),addpr('youtubeid',''),addpr('sourcetype','show'))
#
elif (mode=='BrowseUrl'): XBMC_System_Exec('"%s"' % url)
elif (mode=='FavoritesList'): Fav_List(site=site,section=section,subfav=addpr('subfav',''))
elif (mode=='About'): eod(); DoA('Back'); About();
elif (mode=='PlayPICTURES'): PlayPictures(url)
elif (mode=='PlayURL'): PlayURL(url)
elif (mode=='PlayURLs'): PlayURLs(url)
elif (mode=='PlayURLstrm'): PlayURLstrm(url)
elif (mode=='PlayFromHost'): PlayFromHost(url)
elif (mode=='PlayVideo'): PlayVideo(url)
elif (mode=='PlayItCustom'): PlayItCustom(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='PlayItCustomL2A'): PlayItCustomL2A(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='Settings'): _addon.addon.openSettings() # Another method: _plugin.openSettings() ## Settings for this addon.
elif (mode=='ResolverSettings'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='ResolverUpdateHostFiles'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='TextBoxFile'): TextBox2().load_file(url,addpr('title','')); #eod()
elif (mode=='TextBoxUrl'): TextBox2().load_url(url,addpr('title','')); #eod()
elif (mode=='Download'):
try: _addon.resolve_url(url)
except: pass
debob([url,addpr('destfile',''),addpr('destpath',''),str(tfalse(addpr('useResolver','true')))])
DownloadThis(url,addpr('destfile',''),addpr('destpath',''),tfalse(addpr('useResolver','true')))
elif (mode=='toJDownloader'): SendTo_JDownloader(url,tfalse(addpr('useResolver','true')))
elif (mode=='cFavoritesEmpty'): fav__COMMON__empty( site=site,section=section,subfav=addpr('subfav','') ); xbmc.executebuiltin("XBMC.Container.Refresh");
elif (mode=='cFavoritesRemove'): fav__COMMON__remove( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year','') )
elif (mode=='cFavoritesAdd'): fav__COMMON__add( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year',''),img=addpr('img',''),fanart=addpr('fanart',''),plot=addpr('plot',''),commonID=addpr('commonID',''),commonID2=addpr('commonID2',''),ToDoParams=addpr('todoparams',''),Country=addpr('country',''),Genres=addpr('genres',''),Url=url ) #,=addpr('',''),=addpr('','')
elif (mode=='AddVisit'):
try: visited_add(addpr('title')); RefreshList();
except: pass
elif (mode=='RemoveVisit'):
try: visited_remove(addpr('title')); RefreshList();
except: pass
elif (mode=='EmptyVisit'):
try: visited_empty(); RefreshList();
except: pass
elif (mode=='refresh_meta'): refresh_meta(addpr('video_type',''),addpr('title',''),addpr('imdb_id',''),addpr('alt_id',''),addpr('year',''))
else: myNote(header='Site: "'+site+'"',msg=mode+' (mode) not found.'); #MenuSection()
示例2: check_mode
def check_mode(mode=''):
deb('Mode',mode)
if (mode=='') or (mode=='main') or (mode=='MainMenu'): Menu_MainMenu() ## Default Menu
elif (mode=='PlayURL'): PlayURL(_param['url']) ## Play Video
elif (mode=='ASubMenu'): Just_A_Sub_Menu(_param['title']) ## Play Video
elif (mode=='Settings'): _addon.addon.openSettings() # Another method: _plugin.openSettings() ## Settings for this addon.
elif (mode=='ResolverSettings'): urlresolver.display_settings() ## Settings for UrlResolver script.module.
#
#
#elif (mode=='YourMode'): YourFunction(_param['url'])
#
#
#
else: myNote(header='Mode: "'+mode+'"',msg='[ mode ] not found.'); Menu_MainMenu() ## So that if a mode isn't found, it'll goto the Main Menu and give you a message about it.
示例3: mode_subcheck
def mode_subcheck(mode='',site='',section='',url=''):
if (mode=='SectionMenu'): SectionMenu()
elif (mode=='') or (mode=='main') or (mode=='MainMenu'): SectionMenu()
elif (mode=='SubMenu'): SubMenu()
elif (mode=='SpecialMenu'): SpecialMenu(url)
elif (mode=='DevFeaturedMenu'): DevFeaturedMenu()
elif (mode=='BrowseMenu'): BrowseMenu()
elif (mode=='ListShows'): ListShows(url,addpr('page',''),addpr('type',''),addpr('idlist',''),addpr('csrfToken',''))
elif (mode=='BrowseCat'): ListShows("https://streamup.com/rooms/%s.js" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='BrowseCat2'): ListShows("https://streamup.com/%s.js" % addpr('cat',''),addpr('page',''),addpr('type',''),addpr('idlist',''))
elif (mode=='Search'): DoSearch(addpr('title',''),url)
elif (mode=='PlayStreamUP'): PlayStreamUP(url,addpr('subfav','title'),addpr('subfav','img'),addpr('roomid',''),addpr('roomslug',''),addpr('plot',''),addpr('live',''),addpr('streamurl',''),addpr('streamkey',''))
#
elif (mode=='FavoritesList'): Fav_List(site=site,section=section,subfav=addpr('subfav',''))
elif (mode=='About'): eod(); About()
elif (mode=='PlayURL'): PlayURL(url)
elif (mode=='PlayURLs'): PlayURLs(url)
elif (mode=='PlayURLstrm'): PlayURLstrm(url)
elif (mode=='PlayFromHost'): PlayFromHost(url)
elif (mode=='PlayVideo'): PlayVideo(url)
elif (mode=='PlayItCustom'): PlayItCustom(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='PlayItCustomL2A'): PlayItCustomL2A(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='Settings'): _addon.addon.openSettings() # Another method: _plugin.openSettings() ## Settings for this addon.
elif (mode=='ResolverSettings'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='ResolverUpdateHostFiles'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='TextBoxFile'): TextBox2().load_file(url,addpr('title','')); #eod()
elif (mode=='TextBoxUrl'): TextBox2().load_url(url,addpr('title','')); #eod()
elif (mode=='Download'):
try: _addon.resolve_url(url)
except: pass
debob([url,addpr('destfile',''),addpr('destpath',''),str(tfalse(addpr('useResolver','true')))])
DownloadThis(url,addpr('destfile',''),addpr('destpath',''),tfalse(addpr('useResolver','true')))
elif (mode=='toJDownloader'): SendTo_JDownloader(url,tfalse(addpr('useResolver','true')))
elif (mode=='cFavoritesEmpty'): fav__COMMON__empty( site=site,section=section,subfav=addpr('subfav','') ); xbmc.executebuiltin("XBMC.Container.Refresh");
elif (mode=='cFavoritesRemove'): fav__COMMON__remove( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year','') )
elif (mode=='cFavoritesAdd'): fav__COMMON__add( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year',''),img=addpr('img',''),fanart=addpr('fanart',''),plot=addpr('plot',''),commonID=addpr('commonID',''),commonID2=addpr('commonID2',''),ToDoParams=addpr('todoparams',''),Country=addpr('country',''),Genres=addpr('genres',''),Url=url ) #,=addpr('',''),=addpr('','')
elif (mode=='AddVisit'):
try: visited_add(addpr('title')); RefreshList();
except: pass
elif (mode=='RemoveVisit'):
try: visited_remove(addpr('title')); RefreshList();
except: pass
elif (mode=='EmptyVisit'):
try: visited_empty(); RefreshList();
except: pass
elif (mode=='refresh_meta'): refresh_meta(addpr('video_type',''),addpr('title',''),addpr('imdb_id',''),addpr('alt_id',''),addpr('year',''))
else: myNote(header='Site: "'+site+'"',msg=mode+' (mode) not found.'); import mMain
示例4: mode_subcheck
def mode_subcheck(mode='',site='',section='',url=''):
deb('mode',mode);
if (mode=='SectionMenu'): SectionMenu()
elif (mode=='') or (mode=='main') or (mode=='MainMenu'): SectionMenu()
elif (mode=='SectionMenuEnglish'): SectionMenuEnglish(addpr('tag',''))
elif (mode=='AddUrlToList'): AddUrlToList(url=url)
elif (mode=='RemoveUrlToList'): RemoveUrlToList(url=url)
elif (mode=='About'): About()
elif (mode=='CustomUpdate'): Update_CustomUpdate(addpr('path',''),addpr('filename',''))
##
elif (mode=='PlayURL'): PlayURL(url)
elif (mode=='PlayURLs'): PlayURLs(url)
elif (mode=='PlayURLstrm'): PlayURLstrm(url)
elif (mode=='PlayFromHost'): PlayFromHost(url)
elif (mode=='PlayVideo'): PlayVideo(url)
elif (mode=='PlayItCustom'): PlayItCustom(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='PlayItCustomL2A'): PlayItCustomL2A(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='Settings'): _addon.addon.openSettings() # Another method: _plugin.openSettings() ## Settings for this addon.
elif (mode=='ResolverSettings'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='ResolverUpdateHostFiles'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='TextBoxFile'): TextBox2().load_file(url,addpr('title','')); #eod()
elif (mode=='TextBoxUrl'): TextBox2().load_url(url,addpr('title','')); #eod()
elif (mode=='Download'):
try: _addon.resolve_url(url)
except: pass
debob([url,addpr('destfile',''),addpr('destpath',''),str(tfalse(addpr('useResolver','true')))])
DownloadThis(url,addpr('destfile',''),addpr('destpath',''),tfalse(addpr('useResolver','true')))
elif (mode=='toJDownloader'): SendTo_JDownloader(url,tfalse(addpr('useResolver','true')))
elif (mode=='cFavoritesEmpty'): fav__COMMON__empty( site=site,section=section,subfav=addpr('subfav','') ); xbmc.executebuiltin("XBMC.Container.Refresh");
elif (mode=='cFavoritesRemove'): fav__COMMON__remove( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year','') )
elif (mode=='cFavoritesAdd'): fav__COMMON__add( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year',''),img=addpr('img',''),fanart=addpr('fanart',''),plot=addpr('plot',''),commonID=addpr('commonID',''),commonID2=addpr('commonID2',''),ToDoParams=addpr('todoparams',''),Country=addpr('country',''),Genres=addpr('genres',''),Url=url ) #,=addpr('',''),=addpr('','')
elif (mode=='AddVisit'):
try: visited_add(addpr('title')); RefreshList();
except: pass
elif (mode=='RemoveVisit'):
try: visited_remove(addpr('title')); RefreshList();
except: pass
elif (mode=='EmptyVisit'):
try: visited_empty(); RefreshList();
except: pass
elif (mode=='refresh_meta'): refresh_meta(addpr('video_type',''),TagAnimeName(addpr('title','')),addpr('imdb_id',''),addpr('alt_id',''),addpr('year',''))
else: myNote(header='Site: "'+site+'"',msg=mode+' (mode) not found.'); import mMain
示例5: check_mode
def check_mode(mode='',site='',section='',url=''):
deb('Mode',mode); deb('param >> site',site); deb('param >> section',section); deb('param >> url',url); deb('param >> title',addpr('title',''))
if (mode=='') or (mode=='main') or (mode=='MainMenu'):
if (site==''): import mMain; return
if (mode=='PlayURL'): PlayURL(url)
elif (mode=='PlayURLs'): PlayURLs(url)
elif (mode=='PlayURLstrm'): PlayURLstrm(url)
elif (mode=='PlayFromHost'): PlayFromHost(url)
elif (mode=='PlayVideo'): PlayVideo(url)
elif (mode=='PlayItCustom'): PlayItCustom(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='PlayItCustomL2A'): PlayItCustomL2A(url,addpr('streamurl',''),addpr('img',''),addpr('title',''))
elif (mode=='Settings'): _addon.addon.openSettings() # Another method: _plugin.openSettings() ## Settings for this addon.
elif (mode=='ResolverSettings'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='ResolverUpdateHostFiles'): import urlresolver; urlresolver.display_settings() ## Settings for UrlResolver script.module.
elif (mode=='TextBoxFile'): TextBox2().load_file(url,addpr('title','')); #eod()
elif (mode=='TextBoxUrl'): TextBox2().load_url(url,addpr('title','')); #eod()
elif (mode=='Download'):
try: _addon.resolve_url(url)
except: pass
debob([url,addpr('destfile',''),addpr('destpath',''),str(tfalse(addpr('useResolver','true')))])
DownloadThis(url,addpr('destfile',''),addpr('destpath',''),tfalse(addpr('useResolver','true')))
elif (mode=='toJDownloader'): SendTo_JDownloader(url,tfalse(addpr('useResolver','true')))
elif (mode=='cFavoritesEmpty'): fav__COMMON__empty( site=site,section=section,subfav=addpr('subfav','') )
elif (mode=='cFavoritesRemove'): fav__COMMON__remove( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year','') )
elif (mode=='cFavoritesAdd'): fav__COMMON__add( site=site,section=section,subfav=addpr('subfav',''),name=addpr('title',''),year=addpr('year',''),img=addpr('img',''),fanart=addpr('fanart',''),plot=addpr('plot',''),commonID=addpr('commonid',''),commonID2=addpr('commonid2',''),ToDoParams=addpr('todoparams',''),Country=addpr('country',''),Genres=addpr('genres',''),Url=url ) #,=addpr('',''),=addpr('','')
else:
### Handle importing .py file for the right site.
siteL=site.lower()
debob(xbmc.translatePath(os.path.join(_addonPath,site+'.py')))
if (siteL=='others'): import mOthers
elif (siteL=='misc'): import mMisc
elif (siteL=='mMovies_and_TV'): import mMovies_and_TV
elif (siteL=='mAnime'): import mAnime
elif (siteL=='mLiveStreams'): import mLiveStreams
elif (siteL=='resolverplugins'): import mResolverPlugins
#
elif isFile(xbmc.translatePath(os.path.join(_addonPath,site+'.py')))==True: __import__(site)
else: myNote(header='Mode: "'+mode+'"',msg=site+' (site) not found.'); import mMain; return
示例6: parseUrl
def parseUrl():
params = ParameterHandler()
# If no function is set, we set it to the default "load" function
if params.exist('function'):
sFunction = params.getValue('function')
if sFunction == 'spacer':
return True
elif sFunction == 'clearCache':
from resources.lib.handler.requestHandler import cRequestHandler
cRequestHandler('dummy').clearCache()
return
elif sFunction == 'changeWatched':
changeWatched(params)
return
elif sFunction == 'updateMeta':
updateMeta(params)
return
elif sFunction == 'searchAlter':
searchAlter(params)
return
else:
sFunction = 'load'
# Test if we should run a function on a special site
if not params.exist('site'):
xbmc.executebuiltin('XBMC.RunPlugin(%s?function=clearCache)' % sys.argv[0])
# As a default if no site was specified, we run the default starting gui with all plugins
showMainMenu(sFunction)
return
sSiteName = params.getValue('site')
logger.info (params.getAllParameters())
if params.exist('playMode'):
from resources.lib.gui.hoster import cHosterGui
url = False
playMode = params.getValue('playMode')
isHoster = params.getValue('isHoster')
url = params.getValue('url')
manual = params.exist('manual')
if cConfig().getSetting('hosterSelect')=='auto' and playMode != 'jd' and playMode != 'pyload' and not manual:
cHosterGui().streamAuto(playMode, sSiteName, sFunction)
else:
cHosterGui().stream(playMode, sSiteName, sFunction, url)
return
logger.info("Call function '%s' from '%s'" % (sFunction, sSiteName))
# If the hoster gui is called, run the function on it and return
if sSiteName == 'cHosterGui':
showHosterGui(sFunction)
# If global search is called
elif sSiteName == 'globalSearch':
searchGlobal()
elif sSiteName == 'favGui':
showFavGui(sFunction)
# If addon settings are called
elif sSiteName == 'xStream':
oGui = cGui()
oGui.openSettings()
oGui.updateDirectory()
# If the urlresolver settings are called
elif sSiteName == 'urlresolver':
import urlresolver
urlresolver.display_settings()
# If metahandler settings are called
elif sSiteName == 'metahandler':
import metahandler
metahandler.display_settings()
else:
# Else load any other site as plugin and run the function
plugin = __import__(sSiteName, globals(), locals())
function = getattr(plugin, sFunction)
function()
示例7: get_urlresolver_settings
def get_urlresolver_settings():
import urlresolver
urlresolver.display_settings()
return
示例8: Search
if (keyboard.isConfirmed()):
query = keyboard.getText()
addon.save_data('search',query)
Search(section, query)
else:
return
def Search(section, query):
url = BASE_URL + '/?s=' + query
print url
GetTitles(section, url, startPage= '1', numOfPages= '1')
if mode == 'main':
MainMenu()
elif mode == 'BrowseGenre':
BrowseGenre(content)
elif mode == 'GetTitles':
GetTitles(section, url, startPage, numOfPages)
elif mode == 'GetLinks':
GetLinks(section, url)
elif mode == 'GetSearchQuery':
GetSearchQuery(section)
elif mode == 'Search':
Search(query)
elif mode == 'Categories':
Categories(section)
elif mode == 'ResolverSettings':
urlresolver.display_settings()
elif mode == 'PlayVideo':
PlayVideo(url, listitem)
示例9: urlresolver_settings
def urlresolver_settings():
urlresolver.display_settings()
示例10: ShowResolverSettingsDialog
def ShowResolverSettingsDialog():
urlresolver.display_settings()
示例11: ResolverSettings
def ResolverSettings():
urlresolver.display_settings()
示例12: action_get_urlresolver_settings
def action_get_urlresolver_settings(self):
urlresolver.display_settings()
示例13: int
except:pass
try: iconimage = urllib.unquote_plus(params["iconimage"])
except:pass
try:totalitems = int(params["totalitems"])
except:pass
try: folder = urllib.unquote_plus(params["folder"])
except:pass
xbmc.log('Mode: '+str(mode))
xbmc.log('Url: '+str(url))
xbmc.log('Metaname: '+str(metaname))
xbmc.log('Types: '+str(types))
xbmc.log('Name: '+str(name))
xbmc.log('Iconimage: '+str(iconimage))
xbmc.log('Folder: '+str(folder))
if mode == None or url == None or len(url)<1:
MAIN()
elif mode == 1:TvShows()
elif mode == 2: urlresolver.display_settings()
elif mode == 100:Index(url, types)
elif mode == 150:FindHosts(url, name)
elif mode == 200:Search()
xbmcplugin.endOfDirectory(int(sys.argv[1]),succeeded=True)
示例14: parseUrl
#.........这里部分代码省略.........
if mediaType == 'movie':
try:
foundInfo = meta.search_movies(sSearchText)
except:
logger.info('error or nothing found')
foundInfo = False
elif mediaType == 'tvshow':
foundInfo = metahandlers.TheTVDB().get_matching_shows(sSearchText)
else:
return
else:
return
if not foundInfo:
oGui.showInfo('xStream', 'Suchanfrage lieferte kein Ergebnis')
return
# select possible match
dialog = xbmcgui.Dialog()
items = []
for item in foundInfo:
if mediaType == 'movie':
items.append(str(item['title'].encode('utf-8'))+' ('+str(item['year'])+')')
elif mediaType == 'tvshow':
items.append(str(item[1]))
else:
return
index = dialog.select('Film/Serie wählen', items)
if index > -1:
item = foundInfo[index]
else:
return False
if not imdbID:
imdbID = ''
if not year:
year = ''
if mediaType == 'movie':
meta.update_meta(mediaType, name, imdbID, new_imdb_id=str(item['imdb_id']), new_tmdb_id=str(item['tmdb_id']), year=year)
elif mediaType == 'tvshow':
meta.update_meta(mediaType, name, imdbID, new_imdb_id=str(item[2]), year=year)
#print oInputParameterHandler.getAllParameters()
#if params.exist('season'):
# season = params.getValue('season')
#if params.exist('episode'):
# episode = params.getValue('episode')
#meta.update_meta(mediaType, name, imdbID, season=season, episode=episode)
xbmc.executebuiltin("XBMC.Container.Refresh")
return
else:
sFunction = "load"
# Test if we should run a function on a special site
if oInputParameterHandler.exist('site'):
sSiteName = oInputParameterHandler.getValue('site')
logger.info (oInputParameterHandler.getAllParameters())
if oInputParameterHandler.exist('playMode'):
playMode = oInputParameterHandler.getValue('playMode')
if cConfig().getSetting('autoPlay')=='true' and playMode != 'jd':
cHosterGui().streamAuto(playMode, sSiteName, sFunction)
else:
cHosterGui().stream(playMode, sSiteName, sFunction)
return
else:
logger.info("Call function '%s' from '%s'" % (sFunction, sSiteName))
# If the hoster gui is called, run the function on it and return
if sSiteName == 'cHosterGui':
showHosterGui(sFunction)
return
# If global search is called
if sSiteName == 'globalSearch':
searchGlobal()
return
if sSiteName == 'favGui':
showFavGui(sFunction)
return
# If addon settings are called
if sSiteName == 'xStream':
oGui = cGui()
oGui.openSettings()
oGui.updateDirectory()
return
# If the urlresolver settings are called
if sSiteName == 'urlresolver':
import urlresolver
urlresolver.display_settings()
return
# If metahandler settings are called
if sSiteName == 'metahandler':
import metahandler
metahandler.display_settings()
return
# Else load any other site as plugin and run the function
plugin = __import__(sSiteName, globals(), locals())
function = getattr(plugin, sFunction)
function()
else:
# As a default if no site was specified, we run the default starting gui with all plugins
showMainMenu(sFunction)