Quick fix for &list/cache issue

What could go wrong?
This commit is contained in:
Twentysix 2016-06-05 14:31:46 +02:00
parent c6f0f1ee1c
commit 496b122059

View File

@ -1148,6 +1148,9 @@ class Audio:
else:
url = "[SEARCH:]" + url
if "[SEARCH:]" not in url and "youtube" in url:
url = url.split("&")[0] # Temp fix for the &list issue
self._stop_player(server)
self._clear_queue(server)
self._add_to_queue(server, url)
@ -1372,6 +1375,9 @@ class Audio:
else:
url = "[SEARCH:]" + url
if "[SEARCH:]" not in url and "youtube" in url:
url = url.split("&")[0] # Temp fix for the &list issue
# We have a queue to modify
if self.queue[server.id]["PLAYLIST"]:
log.debug("queueing to the temp_queue for sid {}".format(
@ -1777,4 +1783,4 @@ def setup(bot):
bot.loop.create_task(n.queue_scheduler())
bot.loop.create_task(n.disconnect_timer())
bot.loop.create_task(n.reload_monitor())
bot.loop.create_task(n.cache_scheduler())
bot.loop.create_task(n.cache_scheduler())