From c83e1bddb5f70466f42a65ede6445facb684365f Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 24 Oct 2023 00:22:33 -0400 Subject: [PATCH] fix(youtubedownloader): fixed videos being uploaded with the wrong filename --- youtubedownloader/youtubedownloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtubedownloader/youtubedownloader.py b/youtubedownloader/youtubedownloader.py index 621d2cb..b2356a8 100644 --- a/youtubedownloader/youtubedownloader.py +++ b/youtubedownloader/youtubedownloader.py @@ -78,7 +78,7 @@ class YouTubeDownloader(commands.Cog): previously_existed = True else: previously_existed = False - return yt.streams.first().download(filename=filename, output_path=path), previously_existed + return yt.streams.first().download(filename=filename, output_path=path), previously_existed, filename_format data_path = await self.config.save_directory() if subfolder and await self.bot.is_owner(ctx.author): data_path = os.path.join(data_path, subfolder) @@ -117,7 +117,7 @@ class YouTubeDownloader(commands.Cog): if os.path.isfile(output[0]): with open(output[0], 'rb') as file: try: - complete_message = await ctx.send(content="YouTube Downloader completed!\nDownloaded file:", file=discord.File(file, output[0])) + complete_message = await ctx.send(content="YouTube Downloader completed!\nDownloaded file:", file=discord.File(file, output[3])) except ValueError: complete_message = await ctx.send(content="YouTube Downloader completed, but the file was too large to upload.") file.close()