Skip to content

Comments

Improve robustness of card face matching#114

Open
pappnu wants to merge 1 commit intoInvestigamer:mainfrom
pappnu:card-face-matching
Open

Improve robustness of card face matching#114
pappnu wants to merge 1 commit intoInvestigamer:mainfrom
pappnu:card-face-matching

Conversation

@pappnu
Copy link
Contributor

@pappnu pappnu commented Jun 21, 2025

Makes the layout fall back to first card face for multi-faced cards if none of the card faces match the image file's name.

When rendering Adventure cards, even a slight typo in the image file's name causes the layout to use incorrect "front face" data even though the correct card is fetched from Scryfall thanks to the set code and collector number, if specified. For Adventure cards we always want to match the first card face since they don't have faces in the same sense as Transform and other similar cards, so defaulting to the first face works well for them. Properly dual faced cards need the precisely correct face name to decide which face to render, so this PR additionally adds logging to make it clearer that the image file's name might be wrong.

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