本文整理汇总了Python中Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper.getNormalizeStr方法的典型用法代码示例。如果您正苦于以下问题:Python CParsingHelper.getNormalizeStr方法的具体用法?Python CParsingHelper.getNormalizeStr怎么用?Python CParsingHelper.getNormalizeStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper
的用法示例。
在下文中一共展示了CParsingHelper.getNormalizeStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.libs.pCommon import CParsingHelper [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.libs.pCommon.CParsingHelper import getNormalizeStr [as 别名]
def __init__(self, session, params={}):
# params: vk_title, movie_title
self.session = session
Screen.__init__(self, session)
self.params = params
self.params['login'] = config.plugins.iptvplayer.opensuborg_login.value
self.params['password'] = config.plugins.iptvplayer.opensuborg_password.value
self.searchPattern = CParsingHelper.getNormalizeStr( self.params.get('movie_title', '') )
# try to guess season and episode number
try:
tmp = CParsingHelper.getSearchGroups(self.searchPattern + ' ', 's([0-9]+?)e([0-9]+?)[^0-9]', 2)
self.episodeData = {'season': int(tmp[0]), 'episode':int(tmp[1])}
except:
self.episodeData = {'season':-1, 'episode':-1}
self.onShown.append(self.onStart)
self.onClose.append(self.__onClose)
self.subProvider = OpenSubOrgProvider()
self["title"] = Label(" ")
self["console"] = Label(" ")
self["label_red"] = Label(_("Cancel"))
self["label_yellow"] = Label(_("Move group"))
self["label_green"] = Label(_("Apply"))
self["icon_red"] = Cover3()
self["icon_yellow"] = Cover3()
self["icon_green"] = Cover3()
self["list"] = IPTVMainNavigatorList()
self["list"].connectSelChanged(self.onSelectionChanged)
self["actions"] = ActionMap(["ColorActions", "SetupActions", "WizardActions", "ListboxActions"],
{
"cancel": self.keyExit,
"ok" : self.keyOK,
"red" : self.keyRed,
"yellow": self.keyYellow,
"green" : self.keyGreen,
}, -2)
self.iconPixmap = {}
for icon in ['red', 'yellow', 'green']:
self.iconPixmap[icon] = LoadPixmap(GetIconDir(icon+'.png'))
self.movieTitle = ''
self.stackList = []
self.stackItems = []
self.defaultLanguage = GetDefaultLang()
self.listMode = False
self.downloadedSubFilePath = ''
self.loginPassed = False
self.tmpItem = None