当前位置: 首页>>代码示例>>Python>>正文


Python ChannelList.setMaxChannels方法代码示例

本文整理汇总了Python中ChannelList.ChannelList.setMaxChannels方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelList.setMaxChannels方法的具体用法?Python ChannelList.setMaxChannels怎么用?Python ChannelList.setMaxChannels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ChannelList.ChannelList的用法示例。


在下文中一共展示了ChannelList.setMaxChannels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ChannelConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import setMaxChannels [as 别名]

#.........这里部分代码省略.........
        set8 = ""
        set9 = ""

        try:
            set1 = ADDON_SETTINGS.getSetting(setting1)
            set2 = ADDON_SETTINGS.getSetting(setting2)
            set3 = ADDON_SETTINGS.getSetting(setting3)
            set4 = ADDON_SETTINGS.getSetting(setting4)
            set5 = ADDON_SETTINGS.getSetting(setting5)
            set6 = ADDON_SETTINGS.getSetting(setting6)
            set7 = ADDON_SETTINGS.getSetting(setting7)
            set8 = ADDON_SETTINGS.getSetting(setting8)
            set9 = ADDON_SETTINGS.getSetting(setting9)
        except:
            pass

        if (
            chantype != self.channel_type
            or set1 != self.setting1
            or set2 != self.setting2
            or set3 != self.setting3
            or set4 != self.setting4
            or set5 != self.setting5
            or set6 != self.setting6
            or set7 != self.setting7
            or set8 != self.setting8
            or set9 != self.setting9
        ):
            ADDON_SETTINGS.setSetting("Channel_" + chan + "_changed", "true")

        ADDON_SETTINGS.writeSettings()
        # save total number of channels to settings.xml so we don't have to keep looping
        # through settings2.xml
        self.chnlst.setMaxChannels()

        self.log("saveSettings return")

    def cancelChan(self):
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_type", str(self.channel_type))
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_1", self.setting1)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_2", self.setting2)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_3", self.setting3)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_4", self.setting4)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_5", self.setting5)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_6", self.setting6)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_7", self.setting7)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_8", self.setting8)
        ADDON_SETTINGS.setSetting("Channel_" + str(self.channel) + "_9", self.setting9)

    def hideChanDetails(self):
        self.getControl(106).setVisible(False)

        for i in range(NUMBER_CHANNEL_TYPES):
            self.getControl(120 + i).setVisible(False)

        self.setFocusId(102)
        self.getControl(105).setVisible(True)
        self.showingList = True
        self.updateListing(self.channel)
        self.listcontrol.selectItem(self.channel - 1)

    def onClick(self, controlId):
        self.log("onClick " + str(controlId))

        if controlId == 102:
            self.getControl(105).setVisible(False)
开发者ID:jtucker1972,项目名称:XBMC-TVTime,代码行数:70,代码来源:ChannelConfig.py


注:本文中的ChannelList.ChannelList.setMaxChannels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。