mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 13:03:54 -06:00
fix: read a pack version past its platform part
_pack_version took the text after the last underscore of the pack name. AmberELEC's prerelease-20261019_1835 read as 1835 and the page would announce a version gap that does not exist. The site now removes the platform part the builder writes (platform_pack_prefix).
This commit is contained in:
1 parent
52b7ee0f46
commit
bc489273a0
3 files changed
+53
-8
No files matched your search
@@ -369,13 +369,25 @@ def _platform_pack_stem(
|
||||
rep_cfg = load_platform_config(representative, platforms_dir)
|
||||
version = rep_cfg.get("version", rep_cfg.get("dat_version", ""))
|
||||
version_tag = f"_{_name_part(str(version))}" if version else ""
|
||||
return platform_pack_prefix(group_platforms, representative, platforms_dir) + version_tag
|
||||
|
||||
|
||||
def platform_pack_prefix(
|
||||
group_platforms: list[str], representative: str, platforms_dir: str
|
||||
) -> str:
|
||||
"""Platform part of a pack name without the version.
|
||||
|
||||
The site reads a pack's version back by removing this prefix: a version
|
||||
may hold an underscore (AmberELEC prerelease-20261019_1835).
|
||||
"""
|
||||
if len(group_platforms) <= 1:
|
||||
return _name_part(rep_cfg.get("platform", representative), "_") + version_tag
|
||||
rep_cfg = load_platform_config(representative, platforms_dir)
|
||||
return _name_part(rep_cfg.get("platform", representative), "_")
|
||||
names = [
|
||||
load_platform_config(p, platforms_dir).get("platform", p)
|
||||
for p in group_platforms
|
||||
]
|
||||
return "_".join(_name_part(n) for n in names) + version_tag
|
||||
return "_".join(_name_part(n) for n in names)
|
||||
|
||||
|
||||
def platform_list_version(config: dict, platform: str) -> str:
|
||||
|
||||
Reference in new issue
Block a user