Skip cover/metadata scraping for NoPayStation themes and DLC
This commit is contained in:
@@ -30,6 +30,15 @@ _PLATFORMS = {
|
||||
"ps1": {"libretro_repo": "Sony_-_PlayStation", "igdb_id": 7, "ss_id": "57"},
|
||||
}
|
||||
|
||||
# Content types that have no meaningful cover/metadata (IGDB/etc. lookups
|
||||
# return unrelated games, so scraping is disabled for them).
|
||||
NON_COVER_SYSTEMS = {"theme", "dlc"}
|
||||
|
||||
|
||||
def is_scrapable(system):
|
||||
"""Whether cover/metadata scraping makes sense for this item type."""
|
||||
return (system or "games") not in NON_COVER_SYSTEMS
|
||||
|
||||
|
||||
def _platform(system):
|
||||
"""Platform parameters (libretro repo, IGDB id, ScreenScraper id)."""
|
||||
@@ -1142,6 +1151,8 @@ def fetch_cover(name, release_id, system, timeout=10, quick=False):
|
||||
``quick`` limits the game fallback to libretro only (index-driven and fast),
|
||||
for bulk store loading; details views use the full IGDB/ScreenScraper path.
|
||||
"""
|
||||
if not is_scrapable(system):
|
||||
return None
|
||||
dest = cover_path(release_id, system)
|
||||
if dest.exists():
|
||||
if file_is_image(dest):
|
||||
|
||||
Reference in New Issue
Block a user