mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
Identify demoscene productions as ROMs via filename tags, Edit-ROM id/URL paste, Demozoo ?title= + rank, unique Pouët search.php 302, and CSDb XML by id (no HTML scrape). Scene ids lock name/summary/cover so game catalogs cannot attach a similarly titled box. CSDb XML is parsed with defusedxml and capped; screenshot and extra links are stored only when they are http(s). Fixes rommapp/romm#1796 (Phase 0–2).
35 lines
870 B
Python
35 lines
870 B
Python
from handler.metadata.sgdb_handler import SGDBResource
|
|
|
|
from .base import BaseModel
|
|
|
|
|
|
class SearchRomSchema(BaseModel):
|
|
id: int | None = None
|
|
igdb_id: int | None = None
|
|
moby_id: int | None = None
|
|
ss_id: int | None = None
|
|
sgdb_id: int | None = None
|
|
flashpoint_id: str | None = None
|
|
launchbox_id: int | None = None
|
|
demozoo_id: int | None = None
|
|
libretro_id: str | None = None
|
|
platform_id: int
|
|
name: str
|
|
slug: str = ""
|
|
summary: str = ""
|
|
igdb_url_cover: str = ""
|
|
moby_url_cover: str = ""
|
|
ss_url_cover: str = ""
|
|
sgdb_url_cover: str = ""
|
|
flashpoint_url_cover: str = ""
|
|
launchbox_url_cover: str = ""
|
|
demozoo_url_cover: str = ""
|
|
libretro_url_cover: str = ""
|
|
is_unidentified: bool
|
|
is_identified: bool
|
|
|
|
|
|
class SearchCoverSchema(BaseModel):
|
|
name: str
|
|
resources: list[SGDBResource]
|