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


Python ChannelList.setupList方法代码示例

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


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

示例1: readConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import setupList [as 别名]
    def readConfig(self):
        self.log('readConfig')
        # Sleep setting is in 30 minute incriments...so multiply by 30, and then 60 (min to sec)
        self.sleepTimeValue = int(REAL_SETTINGS.getSetting('AutoOff')) * 1800
        self.log('Auto off is ' + str(self.sleepTimeValue))
        self.infoOnChange = REAL_SETTINGS.getSetting("InfoOnChange") == "true"
        self.log('Show info label on channel change is ' + str(self.infoOnChange))
        self.showChannelBug = REAL_SETTINGS.getSetting("ShowChannelBug") == "true"
        self.log('Show channel bug - ' + str(self.showChannelBug))
        self.forceReset = REAL_SETTINGS.getSetting('ForceChannelReset') == "true"
        self.channelResetSetting = REAL_SETTINGS.getSetting('ChannelResetSetting')
        self.log("Channel reset setting - " + str(self.channelResetSetting))
        self.channelLogos = xbmc.translatePath(REAL_SETTINGS.getSetting('ChannelLogoFolder'))

        if os.path.exists(self.channelLogos) == False:
            self.channelLogos = IMAGES_LOC

        self.log('Channel logo folder - ' + self.channelLogos)
        self.startupTime = time.time()
        chn = ChannelList()
        self.background.setVisible(True)
        self.channels = chn.setupList()

        if self.channels is None:
            self.log('readConfig No channel list returned')
            self.end()
            return False

        self.Player.stop()
        self.log('readConfig return')
        return True
开发者ID:kyotocafe,项目名称:XBMC-PseudoTV,代码行数:33,代码来源:Overlay.py

示例2: readConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import setupList [as 别名]
    def readConfig(self):
        self.log('readConfig')
        # Sleep setting is in 30 minute incriments...so multiply by 30, and then 60 (min to sec)
        self.sleepTimeValue = int(REAL_SETTINGS.getSetting('AutoOff')) * 1800
        self.log('Auto off is ' + str(self.sleepTimeValue))
        self.infoOnChange = REAL_SETTINGS.getSetting("InfoOnChange") == "true"
        self.log('Show info label on channel change is ' + str(self.infoOnChange))
        self.showChannelBug = REAL_SETTINGS.getSetting("ShowChannelBug") == "true"
        self.log('Show channel bug - ' + str(self.showChannelBug))
        self.forceReset = REAL_SETTINGS.getSetting('ForceChannelReset') == "true"
        self.channelResetSetting = REAL_SETTINGS.getSetting('ChannelResetSetting')
        self.log("Channel reset setting - " + str(self.channelResetSetting))
        self.channelLogos = xbmc.translatePath(REAL_SETTINGS.getSetting('ChannelLogoFolder'))
        self.backgroundUpdating = int(REAL_SETTINGS.getSetting("ThreadMode"))
        self.log("Background updating - " + str(self.backgroundUpdating))
        self.showNextItem = REAL_SETTINGS.getSetting("EnableComingUp") == "true"
        self.log("Show Next Item - " + str(self.showNextItem))
        self.hideShortItems = REAL_SETTINGS.getSetting("HideClips") == "true"
        self.log("Hide Short Items - " + str(self.hideShortItems))
        self.shortItemLength = SHORT_CLIP_ENUM[int(REAL_SETTINGS.getSetting("ClipLength"))]
        self.log("Short item length - " + str(self.shortItemLength))
        self.channelDelay = int(REAL_SETTINGS.getSetting("ChannelDelay")) * 250

        if FileAccess.exists(self.channelLogos) == False:
            self.channelLogos = IMAGES_LOC

        self.log('Channel logo folder - ' + self.channelLogos)
        chn = ChannelList()
        chn.myOverlay = self
        self.channels = chn.setupList()

        if self.channels is None:
            self.log('readConfig No channel list returned')
            self.end()
            return False

        self.Player.stop()
        self.log('readConfig return')
        return True
开发者ID:robnewton,项目名称:XBMC-PseudoTV,代码行数:41,代码来源:Overlay.py

示例3: TVOverlay

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

#.........这里部分代码省略.........


    # setup all basic configuration parameters, including creating the playlists that
    # will be used to actually run this thing
    def readConfig(self):
        self.log('readConfig')
        # Sleep setting is in 30 minute incriments...so multiply by 30, and then 60 (min to sec)
        self.sleepTimeValue = int(REAL_SETTINGS.getSetting('AutoOff')) * 1800
        self.log('Auto off is ' + str(self.sleepTimeValue))
        self.infoOnChange = REAL_SETTINGS.getSetting("InfoOnChange") == "true"
        self.log('Show info label on channel change is ' + str(self.infoOnChange))
        self.showChannelBug = REAL_SETTINGS.getSetting("ShowChannelBug") == "true"
        self.log('Show channel bug - ' + str(self.showChannelBug))
        self.forceReset = REAL_SETTINGS.getSetting('ForceChannelReset') == "true"
        self.channelResetSetting = REAL_SETTINGS.getSetting('ChannelResetSetting')
        self.log("Channel reset setting - " + str(self.channelResetSetting))
        self.channelLogos = xbmc.translatePath(REAL_SETTINGS.getSetting('ChannelLogoFolder'))
        self.backgroundUpdating = int(REAL_SETTINGS.getSetting("ThreadMode"))
        self.log("Background updating - " + str(self.backgroundUpdating))
        self.showNextItem = REAL_SETTINGS.getSetting("EnableComingUp") == "true"
        self.log("Show Next Item - " + str(self.showNextItem))
        self.hideShortItems = REAL_SETTINGS.getSetting("HideClips") == "true"
        self.log("Hide Short Items - " + str(self.hideShortItems))
        self.shortItemLength = SHORT_CLIP_ENUM[int(REAL_SETTINGS.getSetting("ClipLength"))]
        self.log("Short item length - " + str(self.shortItemLength))
        self.channelDelay = int(REAL_SETTINGS.getSetting("ChannelDelay")) * 250

        if FileAccess.exists(self.channelLogos) == False:
            self.channelLogos = IMAGES_LOC

        self.log('Channel logo folder - ' + self.channelLogos)
        self.channelList = ChannelList()
        self.channelList.myOverlay = self
        self.channels = self.channelList.setupList()

        if self.channels is None:
            self.log('readConfig No channel list returned')
            self.end()
            return False

        self.Player.stop()
        self.log('readConfig return')
        return True


    # handle fatal errors: log it, show the dialog, and exit
    def Error(self, line1, line2 = '', line3 = ''):
        self.log('FATAL ERROR: ' + line1 + " " + line2 + " " + line3, xbmc.LOGFATAL)
        dlg = xbmcgui.Dialog()
        dlg.ok('Error', line1, line2, line3)
        del dlg
        self.end()


    def channelDown(self):
        self.log('channelDown')

        if self.maxChannels == 1:
            return

        self.background.setVisible(True)
        channel = self.fixChannel(self.currentChannel - 1, False)
        self.setChannel(channel)
        self.background.setVisible(False)
        self.log('channelDown return')
        
开发者ID:ingolfius,项目名称:Retroplex-XBMC-1,代码行数:69,代码来源:Overlay.py

示例4: readConfig

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import setupList [as 别名]
    def readConfig(self):
        self.log('readConfig')
        ### TV TIME ###
        # Output all settings for debugging purposes
        self.log('#####################################################################################')
        self.log('General Settings:')
        self.log('  Auto off is - ' + str(REAL_SETTINGS.getSetting('AutoOff')))
        self.log('  Show info label on channel change is - ' + str(REAL_SETTINGS.getSetting('InfoOnChange') == "true")) 
        self.log('  Force Channel Reset is - ' + str(REAL_SETTINGS.getSetting('ForceChannelReset')))
        self.log('  Channel Reset Setting is - ' + str(REAL_SETTINGS.getSetting('ChannelResetSetting')))
        self.log('  Show Channel Bug is - ' + str(REAL_SETTINGS.getSetting('ShowChannelBug') == "true"))
        self.log('  Channel Logo Folder is - ' + str(REAL_SETTINGS.getSetting('ChannelLogoFolder')))   
        self.log('  Start Mode is - ' + str(REAL_SETTINGS.getSetting('StartMode')))   
        self.log('  Version is - ' + str(REAL_SETTINGS.getSetting('Version')))

        self.log('Channel Settings:')
        self.log('  Prestage Channels - ' + str(REAL_SETTINGS.getSetting('PrestageChannels')))
        self.log('  Startup Channel is - ' + str(REAL_SETTINGS.getSetting('startupChannel')))
        self.log('  Maximum Number of Music Genres to return - ' + str(REAL_SETTINGS.getSetting('maxMusicGenres')))
        self.log('  Maximum Number of Movie Genres to return  - ' + str(REAL_SETTINGS.getSetting('maxMovieGenres')))

        self.log('Auto Tune Settings:')
        self.log('  Auto Find TV Network Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindNetworks')))
        self.log('  Auto Find Movie Studios Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindStudios')))
        self.log('  Auto Find TV Genres Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindTVGenres')))
        self.log('  Auto Find Movie Genres Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindMovieGenres')))
        self.log('  Auto Find Mixed Genres Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindMixGenres')))
        self.log('  Auto Find Music Genres Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindMusicGenres')))
        self.log('  Auto Find Live Channels is - ' + str(REAL_SETTINGS.getSetting('autoFindLive')))
        self.log('  Channel Limit is - ' + str(REAL_SETTINGS.getSetting('limit')))
        
        self.log('Off Air Settings:')
        self.log('  Off Air Mode is - ' + str(REAL_SETTINGS.getSetting('offair') == "true" ))
        self.log('  Off Air File is - ' + str(REAL_SETTINGS.getSetting('offairfile')))

        self.log('Bumpers Settings:')
        self.log('  Bumpers Mode is - ' + str(REAL_SETTINGS.getSetting('bumpers') == "true" ))
        self.log('  Bumpers Folder is - ' + str(REAL_SETTINGS.getSetting('bumpersfolder')))
        self.log('  Number of Bumpers is - ' + str(REAL_SETTINGS.getSetting('numbumpers')))
        self.log('  Max Number of Bumpers is - ' + str(REAL_SETTINGS.getSetting('maxbumpers')))

        self.log('Commercials Settings:')
        self.log('  Commercials Mode is - ' + str(REAL_SETTINGS.getSetting('commercials') == "true" ))
        self.log('  Commercials Folder is - ' + str(REAL_SETTINGS.getSetting('commercialsfolder')))
        self.log('  Number of Commercials is - ' + str(REAL_SETTINGS.getSetting('numcommercials')))
        self.log('  Max Number of Commercials is - ' + str(REAL_SETTINGS.getSetting('maxcommercials')))

        self.log('Trailers Settings:')
        self.log('  Trailers Mode is - ' + str(REAL_SETTINGS.getSetting('trailers') == "true" ))
        self.log('  Trailers Folder is - ' + str(REAL_SETTINGS.getSetting('trailersfolder')))
        self.log('  Number of Trailers is - ' + str(REAL_SETTINGS.getSetting('numtrailers')))
        self.log('  Max Number of Trailers is - ' + str(REAL_SETTINGS.getSetting('maxtrailers')))

        self.log('Runtime Settings:')
        self.log('  Current Channel is - ' + str(REAL_SETTINGS.getSetting('CurrentChannel')))
        self.log('  Last Reset Time is - ' + str(REAL_SETTINGS.getSetting('LastResetTime')))
        self.log('#####################################################################################')        
        ###############
        
        # Sleep setting is in 30 minute incriments...so multiply by 30, and then 60 (min to sec)
        self.sleepTimeValue = int(REAL_SETTINGS.getSetting('AutoOff')) * 1800
        self.log('Auto off is ' + str(self.sleepTimeValue))
        self.infoOnChange = REAL_SETTINGS.getSetting("InfoOnChange") == "true"
        self.log('Show info label on channel change is ' + str(self.infoOnChange))
        self.showChannelBug = REAL_SETTINGS.getSetting("ShowChannelBug") == "true"
        self.log('Show channel bug - ' + str(self.showChannelBug))
        self.forceReset = REAL_SETTINGS.getSetting('ForceChannelReset') == "true"
        self.channelResetSetting = REAL_SETTINGS.getSetting('ChannelResetSetting')
        self.log("Channel reset setting - " + str(self.channelResetSetting))
        self.channelLogos = xbmc.translatePath(REAL_SETTINGS.getSetting('ChannelLogoFolder'))
        ### TV TIME ###
        self.startupChannel = int(REAL_SETTINGS.getSetting("startupChannel"))
        ###############

        if os.path.exists(self.channelLogos) == False:
            self.channelLogos = IMAGES_LOC

        self.log('Channel logo folder - ' + self.channelLogos)
        self.startupTime = time.time()
        chn = ChannelList()
        self.background.setVisible(True)
        self.channels = chn.setupList()

        if self.channels is None:
            self.log('readConfig No channel list returned')
            self.end()
            return False

        self.Player.stop()

        self.log('readConfig return')
        return True
开发者ID:PseudoTV,项目名称:PseudoTV_Archive,代码行数:94,代码来源:Overlay.py


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