Merge pull request #10066 from zachmsorenson/fix-scryfall-nonlocalized-fallback

Remove slash breaking non-english releases
This commit is contained in:
Oleg Agafonov 2023-02-25 12:41:18 +04:00 committed by GitHub
commit 1465c849e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ public enum ScryfallImageSource implements CardImageSource {
alternativeUrl = link + defaultCode + "?format=image";
// workaround to use cards without english images (some promos or special cards)
if (Objects.equals(baseUrl, alternativeUrl) && baseUrl.endsWith("/en?format=image")) {
alternativeUrl = alternativeUrl.replace("/en?format=image", "/?format=image");
alternativeUrl = alternativeUrl.replace("/en?format=image", "?format=image");
}
} else {
// image