def onAction(self, action):
plugintools.log("ChannelWindow.onAction action.id="+repr(action.getId())+" action.buttonCode="+repr(action.getButtonCode()))
if action == ACTION_PARENT_DIR or action==ACTION_PREVIOUS_MENU or action==ACTION_PREVIOUS_MENU2:
self.close()
if action == ACTION_SELECT_ITEM or action == ACTION_MOUSE_LEFT_CLICK:
#loader_image = os.path.join( plugintools.get_runtime_path(), 'resources', 'skins', 'Default', 'media', 'loader.gif')
#loader = xbmcgui.ControlImage(1200, 19, 40, 40, loader_image)
#self.addControl(loader)
#self.loader.setVisible(True)
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
if item.action.startswith("play_"):
play_items = navigation.get_next_items( item )
self.loader.setVisible(False)
media_url = play_items[0].url
plugintools.direct_play(media_url)
else:
#next_items = navigation.get_next_items( item )
self.loader.setVisible(False)
# Si no hay nada, no muestra la pantalla vacía
#if len(next_items)>0:
next_window = navigation.get_window_for_item( item )
#next_window.setItemlist(next_items)
next_window.setParentItem(item)
next_window.doModal()
del next_window
window_channels.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录