Skip to content

Commit de11e69

Browse files
authored
Merge pull request #1354 from spotDL/dev
* bugfix: fixed opus download (#1351) * bugfix: fixed check for already downloaded songs (#1350)
2 parents 8dff14d + 39a51ff commit de11e69

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

spotdl/download/downloader.py

+2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ async def download_song(self, song_object: SongObject) -> None:
164164

165165
if self.arguments["output_format"] == "m4a":
166166
ytdl_format = "bestaudio[ext=m4a]"
167+
elif self.arguments["output_format"] == "opus":
168+
ytdl_format = "bestaudio[ext=webm]"
167169
else:
168170
ytdl_format = "bestaudio"
169171

spotdl/search/song_gatherer.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def get_song(track):
241241
)
242242
except (LookupError, ValueError):
243243
return None, None
244-
else:
244+
except OSError:
245245
if generate_m3u:
246246
file_path = (
247247
str(
@@ -268,8 +268,10 @@ def get_song(track):
268268
else "mp3"
269269
)
270270

271-
return song, f"{file_path}\n"
271+
return None, f"{file_path}\n"
272272

273+
return None, None
274+
else:
273275
return song, None
274276

275277
with concurrent.futures.ThreadPoolExecutor(max_workers=threads) as executor:

0 commit comments

Comments
 (0)