From c2b27b2805e68525cda82ed15ca1b2e17ac1cd3e Mon Sep 17 00:00:00 2001 From: Jakub Kot <42355410+xnetcat@users.noreply.github.com> Date: Thu, 29 Jul 2021 12:39:49 +0200 Subject: [PATCH 1/2] bugfix: fixed opus download (#1351) --- spotdl/download/downloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spotdl/download/downloader.py b/spotdl/download/downloader.py index 3f5a4aa5f..9a482d1ac 100644 --- a/spotdl/download/downloader.py +++ b/spotdl/download/downloader.py @@ -164,6 +164,8 @@ async def download_song(self, song_object: SongObject) -> None: if self.arguments["output_format"] == "m4a": ytdl_format = "bestaudio[ext=m4a]" + elif self.arguments["output_format"] == "opus": + ytdl_format = "bestaudio[ext=webm]" else: ytdl_format = "bestaudio" From 39a51ffec7184c76423205f40b35c0c789acf29b Mon Sep 17 00:00:00 2001 From: Jakub Kot <42355410+xnetcat@users.noreply.github.com> Date: Thu, 29 Jul 2021 12:39:58 +0200 Subject: [PATCH 2/2] bugfix: fixed check for already downloaded songs (#1350) --- spotdl/search/song_gatherer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spotdl/search/song_gatherer.py b/spotdl/search/song_gatherer.py index e2c6ec889..4a7fb0e91 100644 --- a/spotdl/search/song_gatherer.py +++ b/spotdl/search/song_gatherer.py @@ -241,7 +241,7 @@ def get_song(track): ) except (LookupError, ValueError): return None, None - else: + except OSError: if generate_m3u: file_path = ( str( @@ -268,8 +268,10 @@ def get_song(track): else "mp3" ) - return song, f"{file_path}\n" + return None, f"{file_path}\n" + return None, None + else: return song, None with concurrent.futures.ThreadPoolExecutor(max_workers=threads) as executor: