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)
评论列表
文章目录