-
Notifications
You must be signed in to change notification settings - Fork 95
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
Unable to download card art (1.96 on Windows 10) #1655
Comments
Same problem here, but macOS 11.01 (Bg Sur) |
I don't know if this is the case (just stumbled upon this game recently), but it looks to me like the endpoints for the images need to be reworked? The failed requests point to For example, the request for 0_1_black_Cleric_creature_token.txt resolves to https://c1.scryfall.com/file/scryfall-cards/large/en/tdom/4.jpg which returns a 404, but the (or a) proper method of getting the image would be to call https://api.scryfall.com/cards/tdom/4/en?format=image&version=large instead (though large version is default anyway) Though unfortunately this doesn't seem applicable to every card, for example I haven't even been able to find 0_0_black_Germ_creature_token.txt with a normal text search on https://scryfall.com/ edit: The proper link for 0_0_black_Germ_creature_token seems to be https://api.scryfall.com/cards/tmm2/7/en?format=image |
I wrote script to check any bad card image links and fix them if possible. Luckily only a certain type of link was affected in the cards from the As for the cards in the I could do a PR for this, but I'd like to hear feedback from the maintainers first. In the meantime you could fix the links yourself by running this bash script from the #/bin/bash
if [ -z "$1" ]; then
echo "specify input file"
exit 1
fi
while read -r target; do
read -r data
echo "$target -> $data"
sed -i "/^image=/c\\$data" $target
done < $1 However, I wonder if it wouldn't be better to just rework all card data, considering https://scryfall.com/docs/api/cards provides most if not all the required data (via the |
Thanks for looking into the broken links. A PR for this will be great! We use https://github.com/magarena/magarena-scripts-builder to generate the scripts from https://mtgjson.com/ so the image link can be fixed there. |
Thanks for the pointer, though after looking through the files I have some more remarks:
Unfortunately I don't have an environment set up for Java development/testing so I won't be able to do a PR in that regard, but I could fix/update the |
|
It could be implemented in a way where the image link is used if one is specified for the card (and otherwise a scryfall link is constructed internally). But considering all card script files would need to be recreated to include the necessary information for a scryfall link anyway (card set name and number in set, or scryfall id) its probably not worth the effort right now. As for the current bad links, I don't know how they were created, but I don't see anything inherently wrong in scripts-builder Java code, so I'll just do a direct PR on the scripts at https://github.com/magarena/magarena/tree/master/release/Magarena if thats okay with you. |
All card image links from `scripts_missing` should be valid again There are still about 135 invalid image links in `scripts`, those probably need to be fixed manually (see #1655 (comment))
I remember the links were changed in the past perhaps few times as original URLs stopped working. One solution might be to construct the scryfall link for a card automatically (perhaps have an algorithm or some database aside?), but be able to override the image in the card file itself for those few cases where the default algorithm does not work as expected. |
Can this fix be released in a new release please? |
+1 |
I'm trying to download the missing card art and all I'm getting is a "file not found" error for every card.
The text was updated successfully, but these errors were encountered: