fixed JAP originals tracks prefix

This commit is contained in:
Faraphel 2022-07-24 17:20:34 +02:00
parent 70e324c03a
commit 7866f5ca36

View file

@ -29,11 +29,21 @@ class FormatOriginalTrackLayer(AbstractLayer):
id = match.group("id") id = match.group("id")
name = match.group("value") name = match.group("value")
if (id[0] == "T" and int(id[1]) <= 4) or (id[0] == "U" and int(id[1]) == 1): tag = "Wii" retro_tags = {
# If the cup is in the 4 originals tracks cups, use the wii tags "GCN": "GCN",
# If the cup is in the originals arena cup, use the wii tags "GC": "GCN", # japanese for GameCube
# TODO: tag can't be fetch this way in the JAP version "DS": "DS",
else: tag, name = name.split(" ", 1) "SNES": "SNES",
"SFC": "SNES", # japanese for SNES
"N64": "N64",
"64": "N64", # japanese for N64
"GBA": "GBA",
}
for game_tag, tag in retro_tags.items():
if name.startswith(game_tag):
name = name.removeprefix(game_tag).strip()
break
else: tag = "Wii"
patched_name = Track( patched_name = Track(
name=name, name=name,