本文整理汇总了Python中ChannelList.ChannelList.fillListItems方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelList.fillListItems方法的具体用法?Python ChannelList.fillListItems怎么用?Python ChannelList.fillListItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelList.ChannelList
的用法示例。
在下文中一共展示了ChannelList.fillListItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: APP
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillListItems [as 别名]
class APP(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.PanelPlugins = self.getControl(500)
self.PanelItems = self.getControl(501)
self.fillPlugins()
self.setFocus(self.PanelPlugins)
def onClick(self, controlid):
self.log('onClick ' + str(controlid))
if controlid == 500:
playitem = self.PanelPlugins.getListItem(self.PanelPlugins.getSelectedPosition())
self.chanlist.fillListItems('plugin://'+ playitem.getProperty('mediapath'))
self.setFocus(self.PanelItems)
# xbmc.executebuiltin('Container.Refresh')
elif controlid in [6001,6002,6003,6004]:
if controlid == 6001:
self.log('ACTION_TELETEXT_RED')
self.MyOverlayWindow.windowSwap('EPG')
elif controlid == 6002:
self.log('ACTION_TELETEXT_GREEN')
self.MyOverlayWindow.windowSwap('DVR')
elif controlid == 6003:
self.log('ACTION_TELETEXT_YELLOW')
self.MyOverlayWindow.windowSwap('ONDEMAND')
elif controlid == 6004:
self.log('ACTION_TELETEXT_BLUE')
self.MyOverlayWindow.windowSwap('APPS')
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()
def fillPlugins(self, type='video'):
self.log('fillPlugins, type = ' + type)
json_query = ('{"jsonrpc":"2.0","method":"Addons.GetAddons","params":{"type":"xbmc.addon.%s","properties":["name","path","thumbnail","description","fanart","summary"]}, "id": 1 }'%type)
json_detail = self.chanlist.sendJSON(json_query)
#.........这里部分代码省略.........
示例2: APPS
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import fillListItems [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()