def onControl(self, control):
global TrailerWindow, BusquedaWindow
if control == self.plusinfo:
global ActorInfoWindow, relatedWindow, ActoresWindow, imagesWindow, exit_loop, mainWindow
exit_loop = True
borrar = [relatedWindow, ActorInfoWindow, ActoresWindow, BusquedaWindow, TrailerWindow, imagesWindow]
item_new = Item(channel=self.item.channel, contentType=self.item.contentType, infoLabels=self.infoLabels, thumb_busqueda=self.item.thumb_busqueda, from_channel=self.item.from_channel)
for window in borrar:
try:
window.close()
del window
except:
pass
mainWindow[-1].close()
xbmc.sleep(200)
start(item=item_new, from_window=True)
elif control == self.trailer_r:
item = self.item.clone(thumbnail=self.infoLabels.get("thumbnail"), contextual=True, contentTitle=self.infoLabels.get("title"), windowed=True, infoLabels=self.infoLabels)
item.infoLabels["images"] = ""
TrailerWindow = Trailer('TrailerWindow.xml', config.get_runtime_path()).Start(item, self.trailers)
else:
if control == self.buscar:
try:
check_busqueda = "no_global"
canal = self.item.from_channel
if not canal:
canal = self.item.channel
channel = __import__('channels.%s' % canal, None, None, ["channels.%s" % canal])
itemlist = channel.search(self.item.clone(), self.infoLabels.get("title"))
if not itemlist and self.infoLabels.get("originaltitle"):
itemlist = channel.search(self.item.clone(), self.infoLabels.get("originaltitle", ""))
except:
import traceback
logger.error(traceback.format_exc())
elif control == self.global_search:
check_busqueda = "global"
itemlist = busqueda_global(self.item, self.infoLabels)
if len(itemlist) == 1 and self.infoLabels.get("originaltitle"):
itemlist = busqueda_global(self.item, self.infoLabels, org_title=True)
if itemlist:
BusquedaWindow = Busqueda('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, item=self.item)
BusquedaWindow.doModal()
else:
if check_busqueda == "no_global":
self.removeControl(self.buscar)
self.notfound = xbmcgui.ControlImage(800, 520, 300, 120, "http://imgur.com/V1xs9pT.png")
self.addControl(self.notfound)
self.notfound.setAnimations([('conditional', 'effect=zoom center=auto start=500% end=0% time=2000 condition=true',)])
else:
self.removeControl(self.global_search)
self.notfound = xbmcgui.ControlImage(800, 520, 300, 120, "http://imgur.com/V1xs9pT.png")
self.addControl(self.notfound)
self.notfound.setAnimations([('conditional', 'effect=zoom center=auto start=500% end=0% time=2000 condition=true',)])
评论列表
文章目录