diff --git a/app/covers.py b/app/covers.py index c1794dd..bd7abaa 100644 --- a/app/covers.py +++ b/app/covers.py @@ -411,6 +411,9 @@ def _fetch_libretro(name, timeout, system="games", indexed_only=False): data = fetch_libretro_local(name) if data is not None: return data + # Theme/DLC share the PSP thumbnails repo, so reuse the games index instead + # of downloading a duplicate copy of the same tree under a new system key. + idx_system = system if system in _PLATFORMS else "games" if not indexed_only: # 1. Cheap: exact + progressively stripped names (no index needed). for kind in _LIBRETRO_KINDS: @@ -421,7 +424,7 @@ def _fetch_libretro(name, timeout, system="games", indexed_only=False): # 2. Fuzzy/exact via the precomputed index (covers exact names too, so the # bulk loader skips the wasteful exact pass entirely). for kind in _LIBRETRO_KINDS: - best = _index_best(name, kind, system) + best = _index_best(name, kind, idx_system) if best: data = _fetch_png(best, kind, timeout, system) if data is not None: diff --git a/app/gui.py b/app/gui.py index d93eb9b..3aa8072 100644 --- a/app/gui.py +++ b/app/gui.py @@ -2040,7 +2040,10 @@ class StorePage(QWidget): p = covers.cover_path(rid, system) if p.exists() and covers.file_is_image(p): item.setIcon(QIcon(_fit_pixmap(QPixmap(str(p)), self.ICON_W, self.ICON_H))) - elif rid not in self._cover_attempted: + elif system not in ("theme", "dlc") and rid not in self._cover_attempted: + # Themes and DLC have no meaningful box art in libretro/IGDB, and + # bulk-scraping hundreds of them on every switch to the DLC list + # saturates the network/CPU and makes the store unresponsive. self._cover_attempted.add(rid) self._cover_queue.append((row, { "name": covers.plain_title(it["name"]) or it["name"], @@ -2287,9 +2290,9 @@ class StorePage(QWidget): meta = dlg.selected_meta if meta: title = meta.get("title") or None - info.save(str(rid), "games", meta, manual=True, title=title) + info.save(str(rid), system, meta, manual=True, title=title) it["title_override"] = title or None - self._refresh_item_cover(it, rid, "games") + self._refresh_item_cover(it, rid, system) def _refresh_item_cover(self, it, rid, system): p = covers.cover_path(rid, system)