vitiko98 / qobuz-dl

A complete Lossless and Hi-Res music downloader for Qobuz
GNU General Public License v3.0
1.43k stars 192 forks source link

KeyError: 'albumartist' for config file. #259

Closed flightmansam closed 7 months ago

flightmansam commented 8 months ago
[DEFAULT]
email = 
password = 
default_folder = ~/Qobuz Downloads
default_quality = 27
default_limit = 20
no_m3u = false
albums_only = false
no_fallback = false
og_cover = false
embed_art = true
no_cover = false
no_database = false
app_id =
secrets = 
folder_format = {albumartist} / {album}
track_format = {tracknumber}. {tracktitle}
smart_discography = false

yields:

Traceback (most recent call last):
  File "/home/samuel/miniforge3/bin/qobuz-dl", line 8, in <module>
    sys.exit(main())
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/cli.py", line 176, in main
    _handle_commands(qobuz, arguments)
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/cli.py", line 91, in _handle_commands
    qobuz.interactive()
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/core.py", line 356, in interactive
    self.download_list_of_urls(final_url_list)
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/core.py", line 180, in download_list_of_urls
    self.handle_url(url)
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/core.py", line 160, in handle_url
    self.download_from_id(
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/core.py", line 105, in download_from_id
    dloader.download_id_by_type(not album)
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/downloader.py", line 61, in download_id_by_type
    self.download_release()
  File "/home/samuel/miniforge3/lib/python3.10/site-packages/qobuz_dl/downloader.py", line 100, in download_release
    sanitized_title = sanitize_filepath(folder_format.format(**album_attr))
KeyError: 'albumartist'
flightmansam commented 7 months ago

As i tried to implement this i realised that it was implemented by way of how the album's metadata works so in the context of and album the artist metadata is actually albumartist. 😅