mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 21:08:53 -06:00
refactor: name the profile kinds in model.profiles
lists_files(profile) answers whether a profile declares files, false for a launcher or an alias, and is_emulator(profile) whether it counts as an emulator, false for an alias or a test core. Eighteen inline checks in model, resolve and packs read them; each keeps the set it tested. model.systems keeps its own check: it sits below model.profiles. No behavior change.
This commit is contained in:
1 parent
b679edb133
commit
899f591575
13 files changed
+46
-25
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from model.profiles import lists_files
|
||||
from model.region import WORLD, normalize_declared, rank
|
||||
from resolve.slot import lookup_slot
|
||||
|
||||
@@ -31,7 +32,7 @@ def build_region_index(profiles: dict) -> dict[str, dict]:
|
||||
"""
|
||||
index: dict[str, dict] = {}
|
||||
for emu_name, profile in sorted(profiles.items()):
|
||||
if profile.get("type") in ("launcher", "alias"):
|
||||
if not lists_files(profile):
|
||||
continue
|
||||
for f in profile.get("files") or []:
|
||||
if not isinstance(f, dict):
|
||||
|
||||
Reference in new issue
Block a user