From 9bfdb719c7d617412405c77ba10642d63a66e71f Mon Sep 17 00:00:00 2001 From: Holly Date: Mon, 30 Sep 2024 21:22:41 +0000 Subject: [PATCH] Update for new card types, include default for missing card types --- scrython/cards/cards_object.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scrython/cards/cards_object.py b/scrython/cards/cards_object.py index ffd3baa..7295b29 100644 --- a/scrython/cards/cards_object.py +++ b/scrython/cards/cards_object.py @@ -187,7 +187,9 @@ class CardsObject(FoundationObject): 'augment': lambda num: self.scryfallJson['image_uris'], 'host': lambda num: self.scryfallJson['image_uris'], 'adventure': lambda num: self.scryfallJson['image_uris'], - 'modal_dfc': lambda num: self.scryfallJson['card_faces'][num]['image_uris'] + 'modal_dfc': lambda num: self.scryfallJson['card_faces'][num]['image_uris'], + 'prototype': lambda num: self.scryfallJson['image_uris'], + 'case': lambda num: self.scryfallJson['image_uris'], } image_types = { @@ -199,7 +201,10 @@ class CardsObject(FoundationObject): 'border_crop': lambda d: d['border_crop'] } - images_dict = layouts.get(self.scryfallJson['layout']) + images_dict = layouts.get( + self.scryfallJson['layout'], + lambda num: self.scryfallJson['image_uris'], # Get default if missing + ) uri = image_types.get(image_type)