mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-16 05:42:31 -05:00
fix: filter pattern placeholders, skip standalone exclusions for standalone platforms
This commit is contained in:
@@ -247,6 +247,9 @@ def find_undeclared_files(
|
|||||||
fname = f.get("name", "")
|
fname = f.get("name", "")
|
||||||
if not fname or fname in seen:
|
if not fname or fname in seen:
|
||||||
continue
|
continue
|
||||||
|
# Skip pattern placeholders (e.g., <user-selected>.bin)
|
||||||
|
if "<" in fname or ">" in fname or "*" in fname:
|
||||||
|
continue
|
||||||
# Mode filtering: skip files incompatible with platform's usage
|
# Mode filtering: skip files incompatible with platform's usage
|
||||||
file_mode = f.get("mode")
|
file_mode = f.get("mode")
|
||||||
if file_mode == "standalone" and not is_standalone:
|
if file_mode == "standalone" and not is_standalone:
|
||||||
@@ -322,15 +325,21 @@ def find_exclusion_notes(
|
|||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Count standalone-only files
|
# Count standalone-only files — but only report as excluded if the
|
||||||
standalone_files = [f for f in profile.get("files", []) if f.get("mode") == "standalone"]
|
# platform does NOT use this emulator in standalone mode
|
||||||
if standalone_files:
|
standalone_set = set(str(c) for c in config.get("standalone_cores", []))
|
||||||
names = [f["name"] for f in standalone_files[:3]]
|
is_standalone = emu_name in standalone_set or bool(
|
||||||
more = f" +{len(standalone_files)-3}" if len(standalone_files) > 3 else ""
|
standalone_set & {str(c) for c in profile.get("cores", [])}
|
||||||
notes.append({
|
)
|
||||||
"emulator": emu_display, "reason": "standalone_only",
|
if not is_standalone:
|
||||||
"detail": f"{len(standalone_files)} files for standalone mode only ({', '.join(names)}{more})",
|
standalone_files = [f for f in profile.get("files", []) if f.get("mode") == "standalone"]
|
||||||
})
|
if standalone_files:
|
||||||
|
names = [f["name"] for f in standalone_files[:3]]
|
||||||
|
more = f" +{len(standalone_files)-3}" if len(standalone_files) > 3 else ""
|
||||||
|
notes.append({
|
||||||
|
"emulator": emu_display, "reason": "standalone_only",
|
||||||
|
"detail": f"{len(standalone_files)} files for standalone mode only ({', '.join(names)}{more})",
|
||||||
|
})
|
||||||
|
|
||||||
return notes
|
return notes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user