Skip to content

Commit

Permalink
Merge pull request #1354 from spotDL/dev
Browse files Browse the repository at this point in the history
* bugfix: fixed opus download (#1351)

* bugfix: fixed check for already downloaded songs (#1350)
  • Loading branch information
Silverarmor authored Jul 29, 2021
2 parents 8dff14d + 39a51ff commit de11e69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions spotdl/download/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 4 additions & 2 deletions spotdl/search/song_gatherer.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def get_song(track):
)
except (LookupError, ValueError):
return None, None
else:
except OSError:
if generate_m3u:
file_path = (
str(
Expand All @@ -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:
Expand Down

0 comments on commit de11e69

Please sign in to comment.