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


Python ChannelList.fillTVInfo方法代码示例

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


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

示例1: prepareConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillTVInfo [as 别名]
    def prepareConfig(self):
        self.log("prepareConfig")
        self.showList = []
        self.getControl(105).setVisible(False)
        self.getControl(106).setVisible(False)
        BUSY.create()
        chnlst = ChannelList()
        chnlst.fillTVInfo()
        chnlst.fillMovieInfo()
        self.mixedGenreList = chnlst.makeMixedList(chnlst.showGenreList, chnlst.movieGenreList)
        self.networkList = chnlst.networkList
        self.studioList = chnlst.studioList
        self.showGenreList = chnlst.showGenreList
        self.movieGenreList = chnlst.movieGenreList

        for i in range(len(chnlst.showList)):
            self.showList.append(chnlst.showList[i][0])

        self.mixedGenreList.sort(key=lambda x: x.lower())
        self.listcontrol = self.getControl(102)

        for i in range(999):
            theitem = xbmcgui.ListItem()
            theitem.setLabel(str(i + 1))
            self.listcontrol.addItem(theitem)

        self.updateListing()
        BUSY.close()
        self.getControl(105).setVisible(True)
        self.getControl(106).setVisible(False)
        self.setFocusId(102)
        self.log("prepareConfig return")
开发者ID:rafaelvieiras,项目名称:script.pseudotv,代码行数:34,代码来源:Config.py

示例2: ConfigWindow

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

#.........这里部分代码省略.........
            return "Music Genre"
        elif chantype == 9:
            return "Live"        
        ###############
        elif chantype == 9999:
            return "None"

        return ''

    def prepareConfig(self):
        self.log("prepareConfig")
        self.showList = []
        self.getControl(105).setVisible(False)
        self.getControl(106).setVisible(False)
        ### TV TIME ###
        #self.dlg = xbmcgui.DialogProgress()
        #self.dlg.create("PseudoTV", "Preparing Configuration")
        #self.dlg.update(1)
        #chnlst = ChannelList()
        #chnlst.fillTVInfo()
        #self.dlg.update(40)
        #chnlst.fillMovieInfo()
        #self.dlg.update(80)
        #self.mixedGenreList = chnlst.makeMixedList(chnlst.showGenreList, chnlst.movieGenreList)
        #self.networkList = chnlst.networkList
        #self.studioList = chnlst.studioList
        #self.showGenreList = chnlst.showGenreList
        #self.movieGenreList = chnlst.movieGenreList
        self.dlg = xbmcgui.DialogProgress()
        self.dlg.create("TV Time", "Preparing Channel Wizard")
        self.dlg.update(0, "Preparing Channel Wizard")
        self.chnlst = ChannelList()
        self.dlg.update(10, "Preparing Channel Wizard", "Loading TV Settings")
        self.chnlst.fillTVInfo()
        self.networkList = self.chnlst.networkList
        self.studioList = self.chnlst.studioList
        self.showGenreList = self.chnlst.showGenreList
        self.dlg.update(20, "Preparing Channel Wizard", "Loading Movie Settings")
        self.chnlst.fillMovieInfo()
        self.movieGenreList = self.chnlst.movieGenreList
        self.dlg.update(40, "Preparing Channel Wizard", "Loading Music Settings")
        self.chnlst.fillMusicInfo()
        self.musicGenreList = self.chnlst.musicGenreList        
        self.dlg.update(60, "Preparing Channel Wizard", "Loading Live Feed Settings")
        self.chnlst.fillFeedInfo()
        self.feedList = self.chnlst.feedList
        self.dlg.update(80, "Preparing Channel Wizard", "Loading Mixed Genre Settings")
        self.mixedGenreList = self.chnlst.makeMixedList(self.showGenreList, self.movieGenreList)        
        ###############

        for i in range(len(self.chnlst.showList)):
            self.showList.append(self.chnlst.showList[i][0])

        self.mixedGenreList.sort(key=lambda x: x.lower())
        self.listcontrol = self.getControl(102)

        for i in range(200):
            theitem = xbmcgui.ListItem()
            theitem.setLabel(str(i + 1))
            self.listcontrol.addItem(theitem)

        ### TV TIME ###
        self.resolutionList = []
        self.resolutionList.append('All')
        self.resolutionList.append('SD Only')
        self.resolutionList.append('720p or Higher')
开发者ID:PseudoTV,项目名称:PseudoTV_Archive,代码行数:70,代码来源:config.py

示例3: __init__

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

#.........这里部分代码省略.........
                            file = (files.group(1))
                            label = (labels.group(1))
                            
                            if label.lower() not in SF_FILTER:
                                if filetype == 'directory':
                                    if label.lower() in ['pseudotv']:
                                        plugin_details = self.chanlist.requestList(file)
                                        include = True
                                    
                                    elif label.lower().startswith('channel'):
                                        plugin_details = self.chanlist.requestList(file)
                                        include = True

                                    if include == True:
                                        channelNum = self.chkChannelNum(channelNum)         
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "15")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", file)
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_3", str(MEDIA_LIMIT))
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_4", "0")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rulecount", "1")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_1_id", "1")
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_rule_1_opt_1", label)
                                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                                        self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding Super Favourites",string2=label,progress=int(channelNum*100//CHANNEL_LIMIT))
                    except:
                        pass
                      
            #TV - Networks/Genres
            
            if (REAL_SETTINGS.getSetting("autoFindNetworks") == "true" or REAL_SETTINGS.getSetting("autoFindTVGenres") == "true"):
                self.log("autoTune, Searching for TV Channels")
                self.chanlist.fillTVInfo()

            # need to add check for auto find network channels
            
            if REAL_SETTINGS.getSetting("autoFindNetworks") == "true":
                self.log("autoTune, adding TV Networks")
                channelNum = baseNum
                for i in range(len(self.chanlist.networkList)):
                    channelNum = self.chkChannelNum(channelNum)
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "1")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1",uni(self.chanlist.networkList[i]))
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "4")
                    ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                    self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding TV Networks",string2=uni(self.chanlist.networkList[i]),progress=int(channelNum*100//CHANNEL_LIMIT))
            
            
            if REAL_SETTINGS.getSetting("autoFindTVGenres") == "true":
                self.log("autoTune, adding TV Genres")
                channelNum = baseNum
                for i in range(len(self.chanlist.showGenreList)):
                    if self.chanlist.showGenreList[i] != '':
                        channelNum = self.chkChannelNum(channelNum)
                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_type", "3")
                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_time", "0")
                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_1", uni(self.chanlist.showGenreList[i]))
                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_2", "4")
                        ADDON_SETTINGS.setSetting("Channel_" + str(channelNum) + "_changed", "true")
                        self.myOverlay.setBackgroundStatus("Initializing: Autotuning adding TV Genres",string2=uni(self.chanlist.showGenreList[i]),progress=int(channelNum*100//CHANNEL_LIMIT))
            
            
            if (REAL_SETTINGS.getSetting("autoFindStudios") == "true" or REAL_SETTINGS.getSetting("autoFindMovieGenres") == "true"):
                self.chanlist.fillMovieInfo()
开发者ID:PseudoTV,项目名称:PseudoTV_Live,代码行数:70,代码来源:Migrate.py

示例4: ChannelConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillTVInfo [as 别名]
class ChannelConfig(xbmcgui.WindowXMLDialog):
    def __init__(self, *args, **kwargs):
        self.log("__init__")
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
        self.setCoordinateResolution(1)
        self.showingList = True
        self.channel = 0
        self.channel_type = 9999
        self.setting1 = ""
        self.setting2 = ""
        self.setting3 = ""
        self.setting4 = ""
        self.setting5 = ""
        self.setting6 = ""
        self.setting7 = ""
        self.setting8 = ""
        self.setting9 = ""
        self.doModal()
        self.log("__init__ return")

    def onInit(self):
        self.log("onInit")

        self.createDirectories()

        self.getControl(105).setVisible(False)  # Channel Listing Control Group
        self.getControl(106).setVisible(False)  # Channel Settings Control Group

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

        # migrate()
        self.prepareConfig()
        self.log("onInit return")

    def onFocus(self, controlId):
        pass

    def onAction(self, act):
        action = act.getId()

        if action == ACTION_PREVIOUS_MENU:
            if self.showingList == False:
                self.cancelChan()
                self.hideChanDetails()
            else:
                self.close()

    def prepareConfig(self):
        self.log("prepareConfig")
        self.showList = []
        self.getControl(105).setVisible(False)
        self.getControl(106).setVisible(False)
        self.dlg = xbmcgui.DialogProgress()
        self.dlg.create("TV Time", "Preparing Channel Wizard")
        self.dlg.update(0, "Preparing Channel Wizard")
        self.chnlst = ChannelList()
        self.dlg.update(10, "Preparing Channel Wizard", "Loading TV Settings")
        self.chnlst.fillTVInfo()
        self.networkList = self.chnlst.networkList
        self.studioList = self.chnlst.studioList
        self.showGenreList = self.chnlst.showGenreList
        self.dlg.update(20, "Preparing Channel Wizard", "Loading Movie Settings")
        self.chnlst.fillMovieInfo()
        self.movieGenreList = self.chnlst.movieGenreList
        self.dlg.update(40, "Preparing Channel Wizard", "Loading Music Settings")
        self.chnlst.fillMusicInfo()
        self.musicGenreList = self.chnlst.musicGenreList
        self.dlg.update(60, "Preparing Channel Wizard", "Loading Live Feed Settings")
        self.chnlst.fillFeedInfo()
        self.feedList = self.chnlst.feedList
        self.dlg.update(80, "Preparing Channel Wizard", "Loading Mixed Genre Settings")
        self.mixedGenreList = self.chnlst.makeMixedList(self.showGenreList, self.movieGenreList)

        for i in range(len(self.chnlst.showList)):
            self.showList.append(self.chnlst.showList[i][0])

        self.mixedGenreList.sort(key=lambda x: x.lower())

        self.log("self.networkList " + str(self.networkList))
        self.log("self.studioList " + str(self.studioList))
        self.log("self.showGenreList " + str(self.showGenreList))
        self.log("self.movieGenreList " + str(self.movieGenreList))
        self.log("self.musicGenreList " + str(self.musicGenreList))
        self.log("self.mixedGenreList " + str(self.mixedGenreList))

        self.resolutionList = []
        self.resolutionList.append("All")
        self.resolutionList.append("SD Only")
        self.resolutionList.append("720p or Higher")
        self.resolutionList.append("1080p Only")

        self.showseqList = []
        self.showseqList.append("1 Show")
        self.showseqList.append("2 Shows")
        self.showseqList.append("3 Shows")
        self.showseqList.append("4 Shows")
        self.showseqList.append("5 Shows")
        self.showseqList.append("6 Shows")
        self.showseqList.append("7 Shows")
#.........这里部分代码省略.........
开发者ID:jtucker1972,项目名称:XBMC-TVTime,代码行数:103,代码来源:ChannelConfig.py


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