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


Python ChannelList.fillPlugins方法代码示例

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


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

示例1: APPS

# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillPlugins [as 别名]
class APPS(xbmcgui.WindowXMLDialog):
    def __init__(self, *args, **kwargs):
        self.log('__init__')
        self.chanlist = ChannelList()
        
        
    def log(self, msg, level = xbmc.LOGDEBUG):
        log('APPS: ' + msg, level)


    def onFocus(self, controlid):
        self.log('onFocus')
        
        
    def onInit(self):
        self.log('onInit')
        self.chanlist.PanelItems = self.getControl(500)
        self.chanlist.fillPlugins()
        self.setFocus(self.chanlist.PanelItems)
       
        
    def onClick(self, controlId):
        self.log('onClick ' + str(controlId))
        if controlId == 500:
            pos = self.chanlist.PanelItems.getSelectedPosition()
            playitem = self.chanlist.PanelItems.getListItem(pos)
            url = 'plugin://'+ playitem.getProperty('mediapath')
            self.chanlist.fillListItems(url)
            self.setFocus(self.chanlist.PanelItems)
            # xbmc.executebuiltin('Container.Refresh') 
            
            
    def onAction(self, act):
        self.log('onAction ' + str(act.getId()))
        action = act.getId()
        if action in ACTION_PREVIOUS_MENU:
            self.closeAPPS()  
        
        elif action == ACTION_TELETEXT_RED:
            self.log('ACTION_TELETEXT_RED')
            self.MyOverlayWindow.windowSwap('EPG')
        
        elif action == ACTION_TELETEXT_GREEN:
            self.log('ACTION_TELETEXT_GREEN')
            self.MyOverlayWindow.windowSwap('DVR')
        
        elif action == ACTION_TELETEXT_YELLOW:
            self.log('ACTION_TELETEXT_YELLOW')
            self.MyOverlayWindow.windowSwap('ONDEMAND')
                
        elif action == ACTION_TELETEXT_BLUE:
            self.log('ACTION_TELETEXT_BLUE')
            self.MyOverlayWindow.windowSwap('APPS')
            
        if action in ACTION_PREVIOUS_MENU:
            print 'ACTION_PREVIOUS_MENU'
        
        elif action in ACTION_MOVE_DOWN: 
            print 'ACTION_MOVE_DOWN'
                
        elif action in ACTION_MOVE_UP:
            print 'ACTION_MOVE_UP'

        elif action in ACTION_MOVE_LEFT: 
            print 'ACTION_MOVE_LEFT'
        
        elif action in ACTION_MOVE_RIGHT:
            print 'ACTION_MOVE_RIGHT'
            
        elif action in ACTION_PAGEDOWN: 
            print 'ACTION_PAGEDOWN'
                 
        elif action in ACTION_PAGEUP: 
            print 'ACTION_PAGEUP'
 
        elif action in ACTION_SELECT_ITEM:
            print 'ACTION_SELECT_ITEM'
                
                
    def closeAPPS(self):
        self.log('closeAPPS')
        self.close()
开发者ID:mani49ers559,项目名称:PseudoTV_Live,代码行数:84,代码来源:APPS.py


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