Investigamer / Proxyshop

A Photoshop automation tool for generating high quality Magic the Gathering card renders.
Mozilla Public License 2.0
90 stars 21 forks source link

[BUG] - New scryfall search includes art cards on the search results and those aren't valid to render #58

Closed lukegothic closed 1 year ago

lukegothic commented 1 year ago

Describe the bug Scryfall search is including art cards on the search results and this makes proxyshop discard the search result and throw a "Layout incompatible" error.

To Reproduce Steps to reproduce the behavior:

  1. Open config.ini and set Scryfall.Ascending = True
  2. Put a file called "Prismatic Vista" in the art folder
  3. Press render
  4. It says "Layout incompatible"

Your system:

Screenshots image

Investigamer commented 1 year ago

I've added a fix to this issue on my end and seems to be working, will be pushing some more commits tonight. I think 1.2.0 will be dropping before the end of the week! Just need to run deep tests now, otherwise it's complete

lukegothic commented 1 year ago

Awesome :) any scryfall object that has "set_type": "memorabilia" should be excluded imho.

Also, I guess any result which layout property looks fishy (eg: art_series) should be excluded too.

List of layouts: ['adventure', 'art_series', 'augment', 'class', 'double_faced_token', 'emblem', 'flip', 'host', 'leveler', 'meld', 'modal_dfc', 'normal', 'planar', 'reversible_card', 'saga', 'scheme', 'split', 'token', 'transform', 'vanguard']

Investigamer commented 1 year ago

My thoughts exactly! While I was at it I also fixed a bug with special characters in card name, had to use urllib.parse.quote to feed the name to the scryfall url. Example card is "+2 Mace" which wasn't working before, but will work after this fix :)

Investigamer commented 1 year ago

Awesome :) any scryfall object that has "set_type": "memorabilia" should be excluded imho.

Also, I guess any result which layout property looks fishy (eg: art_series) should be excluded too.

List of layouts: ['adventure', 'art_series', 'augment', 'class', 'double_faced_token', 'emblem', 'flip', 'host', 'leveler', 'meld', 'modal_dfc', 'normal', 'planar', 'reversible_card', 'saga', 'scheme', 'split', 'token', 'transform', 'vanguard']

Fix has been pushed! Cheers! Sidenote: I originally corrected for "art_series" as the layout, but I'm thinking memorabilia might catch other weird situations as well so I went with that instead, might do further research for other potential cases later