mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 02:57:52 -06:00
refactor: one copy of each duplicated helper
This commit is contained in:
1 parent
2c8a9cfad8
commit
238f70c7a7
11 files changed
+49
-79
No files matched your search
@@ -2,7 +2,9 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from core.cli import InputMissing
|
||||
from model.sources import source_yaml
|
||||
@@ -67,3 +69,14 @@ def list_release_pack_platforms(platforms_dir: str = "platforms") -> list[str]:
|
||||
for name in list_registered_platforms(platforms_dir)
|
||||
if registry.get(name, {}).get("release_pack") is True
|
||||
]
|
||||
|
||||
|
||||
VERSIONS_FILE = "data/.versions.json"
|
||||
|
||||
|
||||
def _load_versions(versions_path: str = VERSIONS_FILE) -> dict[str, dict]:
|
||||
path = Path(versions_path)
|
||||
if not path.exists():
|
||||
return {}
|
||||
with open(path) as f:
|
||||
return json.load(f)
|
||||
Reference in new issue
Block a user