From 3cde88e56d78ddeb28a864f336a6ee23df45d51a Mon Sep 17 00:00:00 2001 From: Twentysix Date: Thu, 3 Mar 2016 21:47:10 +0100 Subject: [PATCH] Fixed !local not being able to !loop --- cogs/audio.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cogs/audio.py b/cogs/audio.py index be61952a2..32ddcc0f6 100644 --- a/cogs/audio.py +++ b/cogs/audio.py @@ -200,7 +200,10 @@ class Audio: if self.music_player.is_playing(): if await self.is_alone_or_admin(msg): self.current = -1 - self.playlist = [self.downloader["URL"]] + if 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.") else: 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 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 self.settings["MAX_CACHE"] != 0: @@ -603,8 +606,6 @@ class Audio: self.empty_cache() print("Cache emptied.") - - if msg.channel.is_private and msg.attachments != []: await self.transfer_playlist(msg) if not msg.channel.is_private: