qobuz-dl icon indicating copy to clipboard operation
qobuz-dl copied to clipboard

Key error: 'album'

Open d3v3l15h opened this issue 2 years ago • 3 comments

Hi,

I get the following error :

File "/usr/local/lib/python3.8/dist-packages/qobuz_dl/downloader.py", line 217, in _download_and_tag formatted_path = sanitize_filename(self.track_format.format(**filename_attr)) KeyError: 'album'

with

https://play.qobuz.com/album/5099902985152

Config is : folder_format = {artist} - {album} track_format = {artist} - {album} - {tracknumber} - {tracktitle}

d3v3l15h avatar Mar 20 '22 13:03 d3v3l15h

Working with original config

folder_format = {artist} - {album} ({year}) [{bit_depth}B-{sampling_rate}kHz] track_format = {tracknumber}. {tracktitle}

so I'm not sure what's wrong

d3v3l15h avatar Mar 20 '22 19:03 d3v3l15h

IMHO, the issue is that the 'album' metadata entry is not available for track names, but only for folder names.

I would also like to use, for example, in config.ini

track_format = "{tracknumber}. {tracktitle} - {album} ({year}) - {artist}"

damiencourousse avatar Nov 20 '22 14:11 damiencourousse

Same issue here, would be nice to access this meta on track format

NicolasReffort avatar Jan 21 '23 10:01 NicolasReffort