本文整理汇总了Python中ChannelList.ChannelList.uncleanString方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelList.uncleanString方法的具体用法?Python ChannelList.uncleanString怎么用?Python ChannelList.uncleanString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelList.ChannelList
的用法示例。
在下文中一共展示了ChannelList.uncleanString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConfigWindow
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import uncleanString [as 别名]
#.........这里部分代码省略.........
### TV TIME ###
self.getControl(373).setLabel(self.findItemInList(self.resolutionList, chansetting6))
if chansetting4 <> "":
self.getControl(376).setSelected(int(chansetting4) == int(MODE_UNWATCHED))
###############
elif chantype == 5:
self.getControl(182).setLabel(self.findItemInList(self.mixedGenreList, chansetting1))
### TV TIME ###
self.getControl(383).setLabel(self.findItemInList(self.resolutionList, chansetting6))
if chansetting2 <> "":
self.getControl(389).setSelected(int(chansetting2) == int(MODE_SERIAL))
if chansetting4 <> "":
self.getControl(386).setSelected(int(chansetting4) == int(MODE_UNWATCHED))
if chansetting5 <> "":
self.getControl(387).setSelected(int(chansetting5) == int(MODE_NOSPECIALS))
self.getControl(488).setLabel(self.findItemInList(self.showseqList, chansetting7))
self.getControl(491).setLabel(self.findItemInList(self.movieseqList, chansetting8))
###############
elif chantype == 6:
self.getControl(192).setLabel(self.findItemInList(self.showList, chansetting1))
self.getControl(194).setSelected(chansetting2 == str(MODE_SERIAL))
### TV TIME ###
self.getControl(393).setLabel(self.findItemInList(self.resolutionList, chansetting6))
if chansetting4 <> "":
self.getControl(396).setSelected(int(chansetting4) == int(MODE_UNWATCHED))
if chansetting5 <> "":
self.getControl(397).setSelected(int(chansetting5) == int(MODE_NOSPECIALS))
###############
### TV TIME ###
elif chantype == 7: # folder
fldname = chansetting3
if len(fldname) == 0:
chansetting1 = ''
self.getControl(200).setLabel(fldname, label2=self.chnlst.uncleanString(chansetting1))
elif chantype == 8: # music
self.getControl(212).setLabel(self.findItemInList(self.musicGenreList, chansetting1))
elif chantype == 9: # live
self.getControl(222).setLabel(self.findItemInList(self.feedList, chansetting1))
###############
self.log("fillInDetails return")
def findItemInList(self, thelist, item):
### TV TIME ###
#loitem = item.lower()
item = item.decode('utf-8')
loitem = item.lower()
###############
for i in thelist:
### TV TIME ###
#if loitem == i.lower():
i = i.decode('utf-8')
if loitem == i.lower():
###############
return item
if len(thelist) > 0:
return thelist[0]
return ''
def getChanTypeLabel(self, chantype):
if chantype == 0:
示例2: ChannelConfig
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import uncleanString [as 别名]
#.........这里部分代码省略.........
self.changeListData(self.movieseqList, 491, -1)
elif controlId == 493:
self.changeListData(self.movieseqList, 491, 1)
self.log("onClick return")
def changeListData(self, thelist, controlid, val):
self.log("changeListData " + str(controlid) + ", " + str(val))
curval = self.getControl(controlid).getLabel()
found = False
index = 0
if len(thelist) == 0:
self.getControl(controlid).setLabel("")
self.log("changeListData return Empty list")
return
for item in thelist:
if item == curval:
found = True
break
index += 1
if found == True:
index += val
while index < 0:
index += len(thelist)
while index >= len(thelist):
index -= len(thelist)
self.getControl(controlid).setLabel(self.chnlst.uncleanString(thelist[index]))
self.log("changeListData return")
def changeChanType(self, channel, val):
self.log("changeChanType " + str(channel) + ", " + str(val))
chantype = 9999
try:
chantype = int(ADDON_SETTINGS.getSetting("Channel_" + str(channel) + "_type"))
except:
self.log("Unable to get channel type")
if val != 0:
chantype += val
if chantype < 0:
chantype = 9999
elif chantype == 10000:
chantype = 0
elif chantype == 9998:
chantype = NUMBER_CHANNEL_TYPES - 1
elif chantype == NUMBER_CHANNEL_TYPES:
chantype = 9999
ADDON_SETTINGS.setSetting("Channel_" + str(channel) + "_type", str(chantype))
else:
self.channel_type = chantype
self.setting1 = ""
self.setting2 = ""
self.setting3 = ""
self.setting4 = ""
self.setting5 = ""
self.setting6 = ""