From 53753cc399b255b51c7ce66c36dc28857b93b793 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 17 Apr 2019 19:01:17 +0200 Subject: [PATCH] Try some things --- royalnet/audio/royalaudiofile.py | 5 +++-- royalnet/bots/discord.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/royalnet/audio/royalaudiofile.py b/royalnet/audio/royalaudiofile.py index a0359a3b..8a49b048 100644 --- a/royalnet/audio/royalaudiofile.py +++ b/royalnet/audio/royalaudiofile.py @@ -47,5 +47,6 @@ class RoyalAudioFile(YtdlFile): return discord.PCMAudio(file) def delete_audio_file(self): - # TODO: _might_ be unsafe, test this - os.remove(self.audio_filename) + # TODO: can't delete it yet, see as_audio_source() + # os.remove(self.audio_filename) + pass diff --git a/royalnet/bots/discord.py b/royalnet/bots/discord.py index 461f915e..1028e571 100644 --- a/royalnet/bots/discord.py +++ b/royalnet/bots/discord.py @@ -245,6 +245,7 @@ class DiscordBot: return def advance(error=None): + next_file.delete_audio_file() loop.create_task(self.advance_music_data(guild)) log.info(f"Starting playback of {next_file.info.title}")