From a646bf129e656c52414023ee53dee0cdbf240b89 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 1 Aug 2023 00:07:30 -0400 Subject: [PATCH] cleanup: cleaned up some useless code --- musicdownloader/musicdownloader.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/musicdownloader/musicdownloader.py b/musicdownloader/musicdownloader.py index 298b909..b968536 100644 --- a/musicdownloader/musicdownloader.py +++ b/musicdownloader/musicdownloader.py @@ -55,9 +55,7 @@ class MusicDownloader(commands.Cog): 'paths': {'home': path} } with YoutubeDL(ydl_opts) as ydl: - error_code = ydl.download(url) - with YoutubeDL(ydl_opts) as ydl: - info = ydl.extract_info(url=url, download=False) + info = ydl.extract_info(url=url, download=True) title = info['title'] return title data_path = await self.config.save_directory()