mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 02:57:52 -06:00
refactor: read mame release tags in the model
The tag and version helpers lived in the romset DAT importer, so the site cards, which may not import a scraper, matched the label with their own pattern. model.mamerelease now owns mame_tag, mame_version and tag_version. Both scrapers and the cards call it. check_freshness only lifts tags out of labels and converts nothing, so it keeps its own search.
This commit is contained in:
1 parent
8a8fa71fbc
commit
4acfd8f763
7 files changed
+41
-19
No files matched your search
@@ -400,20 +400,6 @@ MAME_LISTXML_URL = (
|
||||
MAME_REPO = "mamedev/mame"
|
||||
|
||||
|
||||
def mame_tag(version: str) -> str:
|
||||
"""The mamedev/mame release tag of a version: 0.289 is mame0289."""
|
||||
return "mame" + version.replace(".", "").zfill(4)
|
||||
|
||||
|
||||
def mame_version(tag: str) -> str:
|
||||
"""The version a mamedev/mame release tag names: mame0289 is 0.289.
|
||||
|
||||
Anything else (a branch, a commit) is returned as it is.
|
||||
"""
|
||||
raw = tag.removeprefix("mame")
|
||||
if raw.isdigit() and len(raw) >= 4:
|
||||
return f"{raw[0]}.{raw[1:]}"
|
||||
return raw
|
||||
FBNEO_REPO = "libretro/FBNeo"
|
||||
FBNEO_API = f"https://api.github.com/repos/{FBNEO_REPO}"
|
||||
|
||||
|
||||
Reference in new issue
Block a user