MagicTheGathering/mtg-api

Possible bug adding additional foreignNames for each basic land

AlbertCalvet opened this issue · 2 comments

I'm not sure if this is intended or it really is unexpected, or if I got it wrong, but here it goes:

I requested the Zendikar expansion set (https://api.magicthegathering.io/v1/cards?set=ZEN) and looked at it with a JSON Viewer app, it seems as if for each basic land, like a plain, with different multiverseid (different artwork) in it's foreignNames it is being added both the respective language counterpart (ie: french "Plaine") and all the variants from all the other plains, like an MxN product. I think one plain with a specific art should only have one translation for each language with the same art.

Sorry my english is a little bit lacking. To be more clear, a test case:

Plain, number 230, multiverse id 201973, has 24 foreignName entries, 0 to 5 (6 count) are in French, only one of those matches the image with the translated text (the one with multiverse id 206986, the remaining 5 which are indeed a french translation for a plain, have though different artwork).

Plain, number 230a, multiverse id 195179, has 24 foreignName entries as well, 0 to 5 in french as well, only one of those matches this exact artwork, the other 5 are the other plain variations and one of them is the entry above).

And so on.

I noticed this as I'm building a database that needs a 32 char reference code that must be unique and I'm using set code, first chars of the name, 2 digits for the language and multiverse id (or 6 lasting from your hash code if mid is missing) and I got a few repeated values when I hit the land part.

I'd have to contact the creator of mtgjson.com to see if this was the intended. It looks like foreignNames contains the card for each variation from the variations field (if it exists). This seems like it was intentional, but I don't know for sure.

I would try posting your issue here: https://github.com/mtgjson/mtgjson/issues

Hi! Thanks for your fast response, I'll ask on the mtgjson github