Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename cover art filename to png if wrongly named by Bandcamp #168

Open
celynw opened this issue Nov 6, 2020 · 2 comments
Open

Rename cover art filename to png if wrongly named by Bandcamp #168

celynw opened this issue Nov 6, 2020 · 2 comments
Labels
feature-request New feature or request

Comments

@celynw
Copy link

celynw commented Nov 6, 2020

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`

1 Screenshot 2020-11-06 153743

`.png` version

2 Screenshot 2020-11-06 154234

Output of BandcampDownloader

3 Screenshot 2020-11-06 153915

For a different album, (one used in #64) it really is a JPG, even if you ask for the PNG.

Original `.jpg`

4 Screenshot 2020-11-06 154352

`.png` version

5 Screenshot 2020-11-06 154404

Output of BandcampDownloader

6 Screenshot 2020-11-06 154507

I guess the short question, is if the downloaded files could have the correct extension?

@Otiel Otiel added the feature-request New feature or request label Nov 8, 2020
@Otiel
Copy link
Owner

Otiel commented Nov 8, 2020

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.

@Otiel Otiel changed the title Cover art filename extensions Rename cover art filename to png if wrongly named by Bandcamp Nov 8, 2020
@DarkVoyage
Copy link

DarkVoyage commented May 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants