addon.py 文件源码

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

项目:plugin.video.eyny 作者: lydian 项目源码 文件源码
def play_video(self, vid, size=None):
        try:
            play_info = self.eyny.get_video_link(vid, size)
        except ValueError as e:
            xbmcgui.Dialog().notification(
                heading='Error',
                message=unicode(e))
            return

        if size is None and len(play_info['sizes']) > 1:
            ret = int(xbmcgui.Dialog().select(
                'Please choose quality',
                map(str, play_info['sizes'])))
            self.play_video(vid, ret)

        play_item = xbmcgui.ListItem(
            path=self.build_request_url(
                play_info['video'],
                play_info['current_url']))
        play_item.setProperty("IsPlayable", "true")
        play_item.setInfo(
            type="Video",
            infoLabels={"Title": play_info['title']})
        xbmcplugin.setResolvedUrl(self.addon_handle, True, listitem=play_item)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号