Skip to content

Conversation

@Dragynrain
Copy link
Contributor

Summary

When images are downloaded via Scryfall, they are stored in folders using modern set codes (e.g., DST for Darksteel). However, the image lookup system only checked legacy Code2 folders (e.g., DS), causing images to not load on first access in Adventure mode shops.

This fix extends hasImage() to check multiple folder locations:

  1. Legacy Code2 folder (e.g., DS/) - checked first, wins for duplicates
  2. Modern code folder (e.g., DST/)
  3. Alias folder (if defined)

The fix also handles mixed setups where images may be split across multiple folders, merging contents into the cache while preserving priority for existing legacy folder images.

Fixes #9408

Test Plan

  • Tested with only modern code folders (DST/) - images load on first shop visit
  • Tested with symlinks from legacy to modern folders - still works
  • Tested ~15 Adventure mode shops with older sets - all loaded correctly

Dragynrain and others added 4 commits January 6, 2026 12:33
When images are downloaded via Scryfall, they are stored in folders using
modern set codes (e.g., DST for Darksteel). However, the image lookup
system only checked legacy Code2 folders (e.g., DS), causing images to
not load on first access in Adventure mode shops.

This fix extends hasImage() to check multiple folder locations:
1. Legacy Code2 folder (e.g., DS/) - checked first, wins for duplicates
2. Modern code folder (e.g., DST/)
3. Alias folder (if defined)

The fix also handles mixed setups where images may be split across
multiple folders, merging contents into the cache while preserving
priority for existing legacy folder images.

Fixes Card-Forge#9408
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.

Adventure mode shops fail to load card images on first visit for sets with legacy Code2 values

1 participant