本文整理汇总了Python中DPH_Singleton.Singleton.getServerFromURL方法的典型用法代码示例。如果您正苦于以下问题:Python Singleton.getServerFromURL方法的具体用法?Python Singleton.getServerFromURL怎么用?Python Singleton.getServerFromURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DPH_Singleton.Singleton
的用法示例。
在下文中一共展示了Singleton.getServerFromURL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DPS_MainMenu
# 需要导入模块: from DPH_Singleton import Singleton [as 别名]
# 或者: from DPH_Singleton.Singleton import getServerFromURL [as 别名]
#.........这里部分代码省略.........
params['t_url'] = url + "?type=8"
mainMenuList.append((_("by Artists"), plugin, "artistsEntry", params))
printl("mainMenuList 1: " + str(mainMenuList), self, "D")
#ALBUMS
params = copy.deepcopy(selection[3])
params['t_url'] = url + "?type=9"
mainMenuList.append((_("by Albums"), plugin, "albumsEntry", params))
printl("mainMenuList 2: " + str(mainMenuList), self, "D")
self["menu"].setList(mainMenuList)
self.refreshMenu(0)
printl("mainMenuList: " + str(mainMenuList), self, "D")
printl("", self, "C")
#===========================================================================
#
#===========================================================================
def getSettingsMenuList(self):
printl("", self, "S")
self.nextExitIsQuit = False
self["menu"].setList(self.getSettingsMenu())
self.refreshMenu(0)
printl("", self, "C")
#===========================================================================
#
#===========================================================================
def addSearchString(self, searchString):
printl("", self, "S")
# sample: http://192.168.45.190:32400/search?type=1&query=fringe
serverUrl = self.plexInstance.getServerFromURL(self.s_url)
if searchString is not "" and searchString is not None:
self.s_url = serverUrl + "/search?type=1&query=" + searchString
self.executeSelectedEntry()
printl("", self, "C")
#===========================================================================
# this function starts DP_Lib...
#===========================================================================
def executeSelectedEntry(self):
printl("", self, "S")
printl("self.s_url: " + str(self.s_url), self, "D")
if self.selectedEntry.start is not None:
kwargs = {"url": self.s_url, "uuid": self.uuid, "source": self.source , "viewGroup": self.viewGroup}
if self.showEpisodesDirectly != "notSet":
kwargs["showEpisodesDirectly"] = self.showEpisodesDirectly
self.session.open(self.selectedEntry.start, **kwargs)
elif self.selectedEntry.fnc is not None:
self.selectedEntry.fnc(self.session)
if config.plugins.dreamplex.showFilter.value:
self.selectedEntry = Plugin.MENU_FILTER # we overwrite this now to handle correct menu jumps with exit/cancel button
printl("", self, "C")
#==========================================================================
#
#==========================================================================
def up(self):
printl("", self, "S")
self["menu"].selectPrevious()
printl("", self, "C")
#===========================================================================
#
#===========================================================================
def down(self):
printl("", self, "S")
self["menu"].selectNext()
printl("", self, "C")
#===============================================================================
#
#===============================================================================
def right(self):
printl("", self, "S")
try:
self["menu"].pageDown()
except Exception, ex:
printl("Exception(" + str(type(ex)) + "): " + str(ex), self, "W")
self["menu"].selectNext()
printl("", self, "C")