infoplus.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:addon 作者: alfa-addon 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号