Skip to content

Fixing url to png or jpg conversion bugs#19

Open
KarateSnoopy wants to merge 1 commit into
eigengrau:masterfrom
KarateSnoopy:imagefix
Open

Fixing url to png or jpg conversion bugs#19
KarateSnoopy wants to merge 1 commit into
eigengrau:masterfrom
KarateSnoopy:imagefix

Conversation

@KarateSnoopy

@KarateSnoopy KarateSnoopy commented Feb 25, 2023

Copy link
Copy Markdown

Nice tool but when comparing to the game and TTS Mod Backup on Nexus, it doesn't always figure out correctly if a URL is a PNG or JPG.

This PR fixes the issues I found by using the content type header to figure out which type it is.
and then looks for both files in order to backup.

I tested with:
https://steamcommunity.com/sharedfiles/filedetails/?id=1686824824
which has a set of jpgs and pngs images.

For example,
http://cloud-3.steamusercontent.com/ugc/1000268739968105278/2E183FDC5E647428A96F0F739406794A7CAA4F33/
and
http://i.imgur.com/g1M6tbY.jpg
are both jpg files which prior, it incorrectly thinks they are png files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant