BandcampDownloader
BandcampDownloader copied to clipboard
Rename cover art filename to png if wrongly named by Bandcamp
I've noticed something strange when downloading the cover art.
I have set the following options to try and get a single, maximum quality file (hopefully PNG).
🗹 Save in folder ☐ Convert to JPG ☐ Constrain maximum width/height
I still always end up with a cover.jpg
.
When I go to look at what the maximum quality should be, bandcamp presents me with a address ending in .jpg
, but apparently this is actually a PNG image. And it seems the file downloaded by BandcampDownloader is also a PNG disguised as a JPG.
URLs for both file extensions work, but diff
says they are identical (makes sense).
Original `.jpg`
`.png` version
Output of BandcampDownloader
For a different album, (one used in #64) it really is a JPG, even if you ask for the PNG.
Original `.jpg`
`.png` version
Output of BandcampDownloader
I guess the short question, is if the downloaded files could have the correct extension?
Good catch! Not sure why Bandcamp renames PNG images to .jpg
.
I'll have to see if I can rely on the Content-Type
header to rename the file accordingly.
It is not Bandcamp, but Bandcamp Downloader uses jpg extension to save. If you request any image without extension (i.e. https://f4.bcbits.com/img/a2498578482_0
) - you will get the correct format, at least this works in browser.
Also to topic starter - original is original, you can't request png or jpg, it will always be what is uploaded by author.