Support official card image languages - #11507
Conversation
|
Seems partially redundant to #10928 - if your goal is to avoid 404 responses maybe other languages shouldn't be attempted to fetch unless files generated from that PR are present...? |
|
Thanks for flagging this — there's definitely some shared ground, but I don't think the two are actually redundant. #10928 solves where to fetch from (CDN vs. rate-limited API), and per its description its own language handling is just "edition's default language → English → null" — it doesn't expose a user-facing choice between languages, it just automates what Forge already does per edition today. This PR solves a different problem: a Preferences-level "download card art in language X" toggle across the languages Scryfall indexes, only attempting a non-default language when the bulk-data-derived index confirms that exact printing exists in it — so the 404-avoidance here doesn't depend on which endpoint (API or CDN) ends up serving the request. To generate that index I wrote a small Python script (update_languages.py) that pulls Scryfall's all_cards bulk export directly, filters out digital-only prints, and builds a compact per-set/collector-number bitmask of which of the 10 supported languages each printing exists in (skipping English-only entries, since absence from the file already implies "English only"). It's meant to be re-run periodically to refresh card_languages.txt as new sets/languages are released. I'd rather not gate this on #10928's cdn_uuid files being present, since that PR is still open and its data is explicitly optional/fallback — tying language selection to it would silently disable the language preference for anyone without that cache populated yet, even though our index (built straight from Scryfall's all_cards bulk export) already knows with certainty whether the printing exists in that language. Once #10928 lands the two could compose rather than merge: resolve the language here first, then use (set, collector_number, resolvedLang) to decide CDN vs. API via CdnUuidCache. I'm spanish sorry for the translation BTW. Cheers |
|
I still suspect you're trying to solve a problem that doesn't exist in this form: I would assume they contain none/minimal entries without hosted images existing...? |
|
Thanks for the feedback. |
|
Hmn, I wonder if user is playing in a different language he'd rather have the one translated image available or stick with the the untranslated variant of another set? (especially if it's the same art) 🤔 |
|
@tool4ever Fair point, but this choice doesn't really exist today at all — right now there's no way to get card art in another language. Let's get this in first, and once people can actually use it we'll see what users say and figure out from there whether cross-printing substitution is worth adding. |
|
Hmn I see, I really thought autodownloader would try user language first already... But since |
|
Extending I'd rather get this merged first and iterate on the edition-level approach afterward. Hoping this can get merged soon. |
39749e3 to
649fecf
Compare
|
Right, I understand your goal and it will certainly be good to have support for this but please be aware that when using AI it loves to complicate things so that you're stuck with it - my concerns are:
the field is already connected in code today, just not filled and used fully |
|
Thank you for the feedback. I understand the concerns you raised, but I believe my current approach is the most viable and efficient solution to improve the project at this stage.
I would also like to clarify that the overall logic and structure of this solution are my own. While I used AI assistance for parts of the technical implementation, the design and approach were developed by me to specifically address this improvement. I’ll wait for the feedback from the other reviewers and see what they think. Thank you all for your time and for following up on my PR. |
No description provided.