def onInit(self):
self.setCoordinateResolution(0)
if not self.video_url:
platformtools.dialog_notification("[COLOR crimson][B]Error[/B][/COLOR]",
"[COLOR tomato]Vídeo no disponible[/COLOR]", 2)
self.close()
elif self.video_url == "no_video":
self.close()
else:
new_video = False
while True:
if new_video:
self.doModal()
xlistitem = xbmcgui.ListItem(path=self.video_url, thumbnailImage=self.item.thumbnail)
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
pl.add(self.video_url, xlistitem)
self.player = xbmc.Player()
self.player.play(pl, windowed=True)
while xbmc.Player().isPlaying():
xbmc.sleep(1000)
self.close()
self.video_url = None
new_video = True
self.windows[-1].doModal()
try:
self.video_url = self.windows[-1].result
if not self.video_url:
break
except:
break
评论列表
文章目录