aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhazhismel <[email protected]>2016-03-09 21:19:12 -0500
committerKhazhismel <[email protected]>2016-03-09 21:19:12 -0500
commitfc2127789aaf5b414aa705446a1c84b6585e0eda (patch)
tree3e8823cc4825b7c986809cc33b56f7a14ed6f6d1
parentAdd support for aiohttp connectors. (diff)
downloaddiscord.py-fc2127789aaf5b414aa705446a1c84b6585e0eda.tar.xz
discord.py-fc2127789aaf5b414aa705446a1c84b6585e0eda.zip
Support ytsearch and playlists in youtube_dl_player
-rw-r--r--discord/voice_client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index 9f489e18..77c368a3 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -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)