diff --git a/rare/models/game.py b/rare/models/game.py index 0586ff16..18d300a7 100644 --- a/rare/models/game.py +++ b/rare/models/game.py @@ -467,10 +467,12 @@ class RareGame(RareGameSlim): def set_pixmap(self): self.pixmap = self.image_manager.get_pixmap(self.app_name, self.is_installed) + if not self.pixmap.isNull(): + self.signals.widget.update.emit() + + def load_pixmap(self): if self.pixmap.isNull(): self.image_manager.download_image(self.game, self.set_pixmap, 0, False) - else: - self.signals.widget.update.emit() def refresh_pixmap(self): self.image_manager.download_image(self.game, self.set_pixmap, 0, True) diff --git a/rare/shared/image_manager.py b/rare/shared/image_manager.py index 237d1ab3..37e6bb64 100644 --- a/rare/shared/image_manager.py +++ b/rare/shared/image_manager.py @@ -139,8 +139,8 @@ class ImageManager(QObject): def __init__(self, signals: GlobalSignals, core: LegendaryCore): # lk: the ordering in __img_types matters for the order of fallbacks - # self.__img_types: Tuple = ("DieselGameBoxTall", "Thumbnail", "DieselGameBoxLogo", "DieselGameBox") - self.__img_types: Tuple = ("DieselGameBoxTall", "Thumbnail", "DieselGameBoxLogo") + # self.__img_types: Tuple = ("DieselGameBoxTall", "Thumbnail", "DieselGameBoxLogo", "DieselGameBox", "OfferImageTall") + self.__img_types: Tuple = ("DieselGameBoxTall", "Thumbnail", "DieselGameBoxLogo", "OfferImageTall") self.__dl_retries = 1 self.__worker_app_names: List[str] = [] super(QObject, self).__init__() @@ -178,7 +178,8 @@ class ImageManager(QObject): def __prepare_download(self, game: Game, force: bool = False) -> Tuple[List, Dict]: if force and self.__img_dir(game.app_name).exists(): self.__img_color(game.app_name).unlink(missing_ok=True) - self.__img_color(game.app_name).unlink(missing_ok=True) + self.__img_gray(game.app_name).unlink(missing_ok=True) + self.__img_desktop_icon(game.app_name).unlink(missing_ok=True) if not self.__img_dir(game.app_name).is_dir(): self.__img_dir(game.app_name).mkdir() diff --git a/rare/shared/rare_core.py b/rare/shared/rare_core.py index ac7f6d03..256f12a7 100644 --- a/rare/shared/rare_core.py +++ b/rare/shared/rare_core.py @@ -338,7 +338,6 @@ class RareCore(QObject): origin_worker.signals.result.connect(self.handle_result) QThreadPool.globalInstance().start(origin_worker) - def fetch_extra(self): non_asset_worker = NonAssetWorker(self.__core, self.__args) non_asset_worker.signals.result.connect(self.handle_result) @@ -368,7 +367,7 @@ class RareCore(QObject): def __load_pixmaps(self) -> None: # time.sleep(0.1) for rgame in self.__games.values(): - rgame.set_pixmap() + rgame.load_pixmap() # time.sleep(0.0001) @property