ImageUrlModel: Add more types for lookup.
The issue happened with Farming Simulator 22 freebie, because it doesn't least a tall image. This should be checked again in the future.
This commit is contained in:
parent
9419ff402b
commit
4587c73671
2 changed files with 5 additions and 3 deletions
|
@ -45,8 +45,8 @@ class ImageUrlModel:
|
|||
@dataclass
|
||||
class KeyImagesModel:
|
||||
key_images: Optional[List[ImageUrlModel]] = None
|
||||
tall_types = ("DieselStoreFrontTall", "OfferImageTall", "Thumbnail", "ProductLogo", "DieselGameBoxLogo")
|
||||
wide_types = ("DieselStoreFrontWide", "OfferImageWide", "VaultClosed", "ProductLogo")
|
||||
tall_types = ("DieselGameBoxTall", "DieselStoreFrontTall", "OfferImageTall", "DieselGameBoxLogo", "Thumbnail", "ProductLogo")
|
||||
wide_types = ("DieselGameBoxwide", "DieselStoreFrontWide", "OfferImageWide", "DieselGameBox", "VaultClosed", "ProductLogo")
|
||||
|
||||
def __getitem__(self, item):
|
||||
return self.key_images[item]
|
||||
|
|
|
@ -176,7 +176,9 @@ class StoreDetailsWidget(QWidget, SideTabContents):
|
|||
|
||||
key_images = self.catalog_offer.keyImages
|
||||
img_url = key_images.for_dimensions(self.image.size().width(), self.image.size().height())
|
||||
self.image.fetchPixmap(img_url.url)
|
||||
# FIXME: check why there was no tall image
|
||||
if img_url:
|
||||
self.image.fetchPixmap(img_url.url)
|
||||
|
||||
# self.image_stack.setCurrentIndex(0)
|
||||
about = product_data.about
|
||||
|
|
Loading…
Reference in a new issue