Fixed !local not being able to !loop

This commit is contained in:
Twentysix 2016-03-03 21:47:10 +01:00
parent 235b4bed70
commit 3cde88e56d

View File

@ -200,7 +200,10 @@ class Audio:
if self.music_player.is_playing(): if self.music_player.is_playing():
if await self.is_alone_or_admin(msg): if await self.is_alone_or_admin(msg):
self.current = -1 self.current = -1
if self.downloader["URL"]:
self.playlist = [self.downloader["URL"]] self.playlist = [self.downloader["URL"]]
else: # local
self.playlist = [self.downloader["ID"]]
await self.bot.say("I will play this song on repeat.") await self.bot.say("I will play this song on repeat.")
else: else:
await self.bot.say("I'm in queue mode. Controls are disabled if you're in a room with multiple people.") await self.bot.say("I'm in queue mode. Controls are disabled if you're in a room with multiple people.")
@ -593,7 +596,7 @@ class Audio:
print(e) # TODO print(e) # TODO
audio.downloader = {"DONE" : True, "TITLE" : False, "ID" : False, "URL" : False, "DOWNLOADING" : False} audio.downloader = {"DONE" : True, "TITLE" : False, "ID" : False, "URL" : False, "DOWNLOADING" : False}
async def incoming_messages(self, msg): # Workaround, need to fix async def incoming_messages(self, msg):
if msg.author.id != self.bot.user.id: if msg.author.id != self.bot.user.id:
if self.settings["MAX_CACHE"] != 0: if self.settings["MAX_CACHE"] != 0:
@ -603,8 +606,6 @@ class Audio:
self.empty_cache() self.empty_cache()
print("Cache emptied.") print("Cache emptied.")
if msg.channel.is_private and msg.attachments != []: if msg.channel.is_private and msg.attachments != []:
await self.transfer_playlist(msg) await self.transfer_playlist(msg)
if not msg.channel.is_private: if not msg.channel.is_private: