fix: exporters match exact native formats with display names

This commit is contained in:
Abdessamad Derraz
2026-03-30 16:09:02 +02:00
parent 74269bab84
commit e2d0510f4e
8 changed files with 170 additions and 26 deletions

View File

@@ -46,16 +46,28 @@ class Exporter(BaseExporter):
if nid:
native_map[sys_id] = nid
# Match exact header format of libretro-database/dat/System.dat
version = ""
if scraped_data:
version = scraped_data.get("dat_version", scraped_data.get("version", ""))
lines: list[str] = [
"clrmamepro (",
'\tname "System"',
'\tdescription "System"',
'\tcomment "System, firmware, and BIOS files used by libretro cores."',
]
if version:
lines.append(f"\tversion {version}")
lines.extend([
'\tauthor "libretro"',
'\thomepage "https://github.com/libretro/libretro-database/blob/master/dat/System.dat"',
'\turl "https://raw.githubusercontent.com/libretro/libretro-database/master/dat/System.dat"',
")",
"",
"game (",
'\tname "System"',
]
'\tcomment "System"',
])
systems = truth_data.get("systems", {})
for sys_id in sorted(systems):