Update for new card types, include default for missing card types
This commit is contained in:
parent
ef858dbb8d
commit
9bfdb719c7
|
@ -187,7 +187,9 @@ class CardsObject(FoundationObject):
|
||||||
'augment': lambda num: self.scryfallJson['image_uris'],
|
'augment': lambda num: self.scryfallJson['image_uris'],
|
||||||
'host': lambda num: self.scryfallJson['image_uris'],
|
'host': lambda num: self.scryfallJson['image_uris'],
|
||||||
'adventure': 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 = {
|
image_types = {
|
||||||
|
@ -199,7 +201,10 @@ class CardsObject(FoundationObject):
|
||||||
'border_crop': lambda d: d['border_crop']
|
'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)
|
uri = image_types.get(image_type)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue