🐛 Fix broken await for queuing

This commit is contained in:
Joshua Arulsamy 2020-08-04 18:17:22 -06:00
parent ed1ec214ee
commit ed74254d83

View File

@ -72,6 +72,10 @@ class Plex(commands.Cog):
track_url = self.current_track.getStreamURL() track_url = self.current_track.getStreamURL()
audio_stream = FFmpegPCMAudio(track_url) audio_stream = FFmpegPCMAudio(track_url)
while self.vc.is_playing():
asyncio.sleep(10)
self.vc.play(audio_stream, after=self._toggle_next) self.vc.play(audio_stream, after=self._toggle_next)
logger.debug(f"Playing {self.current_track.title}") logger.debug(f"Playing {self.current_track.title}")
@ -159,7 +163,7 @@ class Plex(commands.Cog):
self.vc.stop() self.vc.stop()
await self.vc.disconnect() await self.vc.disconnect()
self.vc = None self.vc = None
await ctx.send(":stop: Stopped") await ctx.send(":stop_button: Stopped")
@command() @command()
async def pause(self, ctx): async def pause(self, ctx):