mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Support ytsearch and playlists in youtube_dl_player
This commit is contained in:
parent
78e2db1863
commit
fc2127789a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user