Support ytsearch and playlists in youtube_dl_player

This commit is contained in:
Khazhismel 2016-03-09 21:19:12 -05:00
parent 78e2db1863
commit fc2127789a

View File

@ -516,6 +516,9 @@ class VoiceClient:
ydl = youtube_dl.YoutubeDL(opts)
func = functools.partial(ydl.extract_info, url, download=False)
info = yield from self.loop.run_in_executor(None, func)
if "entries" in info:
info = info['entries'][0]
log.info('playing URL {}'.format(url))
download_url = info['url']
player = self.create_ffmpeg_player(download_url, **kwargs)