ps1: IGDB-first only for EBOOT icon, restore usual library order
Library covers go back to libretro -> OpenVGDB -> ScreenScraper -> Wikipedia -> IGDB (last resort) for all systems, including PS1. The EBOOT ICON0 (ps1_art) alone now tries IGDB first for clean banner-less box art, falling back to the normal pipeline.
This commit is contained in:
+23
-17
@@ -1089,12 +1089,26 @@ def _draw_platform_badge(p, label, x, y, color, QRectF, QColor, QFont,
|
||||
def ps1_art(title, release_id, timeout=10):
|
||||
"""Fetch a PS1 game's cover and build ``(icon0, pic0, pic1)`` PNG bytes.
|
||||
|
||||
Reuses the local cover cache when available, otherwise searches the PS1
|
||||
sources (libretro, ScreenScraper, IGDB, Wikipedia). The description and
|
||||
ESRB rating for the PIC0 info board come from IGDB (best effort).
|
||||
The EBOOT icon prefers IGDB first (clean box art without the PlayStation
|
||||
banner that libretro/ScreenScraper thumbnails bake in); if IGDB has
|
||||
nothing it falls back to the normal cover pipeline (libretro, OpenVGDB,
|
||||
ScreenScraper, Wikipedia, IGDB). The description and ESRB rating for the
|
||||
PIC0 info board come from IGDB (best effort).
|
||||
Returns ``(None, None, None)`` when no art can be produced.
|
||||
"""
|
||||
key = release_id or stable_key(title)
|
||||
path = None
|
||||
try:
|
||||
# IGDB first for the icon: clean box art without the banner.
|
||||
data = _fetch_igdb_cover(title, min(timeout, 6), system="ps1")
|
||||
if data is not None:
|
||||
dest = cover_path(key, "ps1")
|
||||
_write_atomic(dest, data)
|
||||
path = dest
|
||||
log.info("ps1 icon cover %r <- igdb", title)
|
||||
except Exception: # noqa: BLE001
|
||||
path = None
|
||||
if path is None:
|
||||
try:
|
||||
path = fetch_cover(title, key, "ps1", timeout=timeout)
|
||||
except Exception: # noqa: BLE001
|
||||
@@ -1166,17 +1180,9 @@ def fetch_cover(name, release_id, system, timeout=10, quick=False):
|
||||
if data is not None:
|
||||
log.info("cover %r <- manual", name)
|
||||
elif system != "videos":
|
||||
# 2. PS1: IGDB first — its covers are clean box art without the
|
||||
# PlayStation banner that libretro/ScreenScraper thumbnails bake in
|
||||
# (redundant with our ICON0 frame). Games: libretro first, then the
|
||||
# shipped OpenVGDB bundle (offline), then ScreenScraper (non-quick),
|
||||
# then Wikipedia (keyless), then IGDB last.
|
||||
data = None
|
||||
if system == "ps1" and not quick and time.time() < deadline:
|
||||
data = _fetch_igdb_cover(name, t, system=system)
|
||||
if data is not None:
|
||||
log.info("cover %r <- igdb", name)
|
||||
if data is None:
|
||||
# 2. Games/PS1: libretro (full box art) first, then the shipped
|
||||
# OpenVGDB bundle (PSP only, offline), then ScreenScraper (non-quick),
|
||||
# then Wikipedia (keyless, non-quick), then IGDB last.
|
||||
data = _fetch_libretro(name, t, system=system, indexed_only=quick)
|
||||
if data is not None:
|
||||
log.info("cover %r <- libretro", name)
|
||||
@@ -1194,12 +1200,12 @@ def fetch_cover(name, release_id, system, timeout=10, quick=False):
|
||||
data = _fetch_wikipedia_cover(name, t)
|
||||
if data is not None:
|
||||
log.info("cover %r <- wikipedia", name)
|
||||
if data is None and system != "ps1" and time.time() < deadline:
|
||||
if data is None and time.time() < deadline:
|
||||
data = _fetch_igdb_cover(name, t, system=system)
|
||||
if data is not None:
|
||||
if system == "games":
|
||||
# IGDB only has cropped 3:4 PSP key art; composite
|
||||
# it into the full PSP cover template.
|
||||
# IGDB only has cropped 3:4 PSP key art; composite it
|
||||
# into the full PSP cover template (header + artwork).
|
||||
data = compose_game_cover(data)
|
||||
log.info("cover %r <- igdb", name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user