def onAction(self, action):
plugintools.log("MenuWindow.onAction action.id="+repr(action.getId())+" action.buttonCode="+repr(action.getButtonCode()))
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
if item.thumbnail!="" and not "thumb_error" in item.thumbnail and not "thumb_folder" in item.thumbnail and not "thumb_nofolder" in item.thumbnail:
self.getControl(301).setImage(item.thumbnail)
self.getControl(302).setText(item.title)
self.getControl(303).setText(item.plot)
if action == ACTION_PARENT_DIR or action==ACTION_PREVIOUS_MENU or action==ACTION_PREVIOUS_MENU2:
self.close()
if action == ACTION_SELECT_ITEM:
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)
pos = self.control_list.getSelectedPosition()
item = self.itemlist[pos]
next_items = navigation.get_next_items( item )
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
评论列表
文章目录