fix: keep RomM files where its player reads them

RomM lists a platform's firmware folder without descending (base_handler.py:1002, recursive=False) and EmulatorJS writes the chosen file, or each zip member, under its bare name. 543 files of the RomM pack sat below a folder where no core could read them. The registry now marks RomM's folder flat, and such files are omitted with the reason below_platform_folder in the manifest and the installer.
This commit is contained in:
Abdessamad Derraz committed 2026-10-19 06:57:36 +02:00
1 parent c7f18e84c3
commit 7d1e9f8816
9 files changed
+5665 -7658

No files matched your search

+1 -1
View File
@@ -3859,7 +3859,7 @@ def _record_unplaceable(unplaceable: list[dict], record_omission: Callable[...,
for u in unplaceable:
record_omission(
u.get("path") or u.get("name", ""), u, u.get("system") or "",
"no_platform_slug", [u.get("emulator", "")],
u.get("unplaceable", "no_platform_slug"), [u.get("emulator", "")],
)
+10 -2
View File
@@ -678,6 +678,7 @@ class ExtraPlacement:
self.slug_based, self.sys_to_slug = _detect_slug_structure(config)
self.platform_systems = set(config.get("systems", {}).keys())
self.native_systems = native_slug_systems(config)
self.flat = bool(config.get("firmware_folder_flat"))
self.norm_map = (
{_norm_system_id(sid): sid for sid in self.platform_systems}
if self.slug_based
@@ -697,11 +698,15 @@ class ExtraPlacement:
entry, self.profiles, self.platform_systems, self.norm_map,
self.sys_to_slug, self.native_systems,
)
if not slug:
if not slug or self.nested(dest):
return None
dest = f"{slug}/{dest}"
return dest, (f"{self.prefix}/{dest}" if self.prefix else dest)
def nested(self, dest: str) -> bool:
"""True when the file would sit below a folder the frontend lists flat."""
return self.slug_based and self.flat and "/" in dest
def _collect_emulator_extras(
config: dict,
@@ -802,7 +807,10 @@ def _collect_emulator_extras(
continue
if placed is None:
if unplaceable is not None:
unplaceable.append(u)
unplaceable.append(
{**u, "unplaceable": "below_platform_folder"}
if placement.nested(dest) else u
)
continue
dest, full_dest = placed
if claimants is not None: