def _play_video(self):
vid = self.root.params['vid']
src = self.root.params['source']
v = Entry('video.get', vid, self.root.conn)
try:
v.set_info()
except:
self.root.gui.notify(self.root.gui._string(400524), '')
return
if 'files' in v.info.keys():
paths = {}
if src == _VK_VIDEO_SOURCE:
for k in v.info['files'].keys():
paths[int(k.split('_')[1])] = v.info['files'][k]
else:
v_url = v.info['player']
if src == _VK_VIDEO_SOURCE:
paths = self.root.parse_vk_player_html(v_url)
### ????? ?????? ??????? ?????????? ?? ????????
k = max(filter(lambda x: x <= _SETTINGS_MAX_RES, paths.keys()))
path = paths[k]
play_item = xbmcgui.ListItem(path = path)
xbmcplugin.setResolvedUrl(_addon_id, True, listitem = play_item)
评论列表
文章目录