zkrising / Tachi

A Cutting-Edge, Modular Score Tracker
https://tachi.ac
121 stars 53 forks source link

feat: songTitle+artist match #1154

Closed nyairobi closed 1 month ago

nyairobi commented 1 month ago

This branch adds an optional artist field to the batch-manual spec, which gets taken into account if matching by songTitle. Consider it a specialized identifier2. I think this is the path of least resistance towards songTitle not sucking.

Not benchmarked because I wouldn't know how.

Tested with the import below. There are 3 Singularities and 1 World Vanquisher in the game. Everything is imported correctly except the 30 score, as expected, because it doesn't have an artist field.

{
    "meta": {
        "game": "ongeki",
        "playtype": "Single",
        "service": "Test"
    },
    "scores": [
        {
            "score": 10,
            "noteLamp": "LOSS",
            "bellLamp": "NONE",
            "matchType": "songTitle",
            "identifier": "Singularity",
            "difficulty": "MASTER",
            "artist": "ETIA.「Arcaea」"
        },
        {
            "score": 20,
            "noteLamp": "LOSS",
            "bellLamp": "NONE",
            "matchType": "songTitle",
            "identifier": "Singularity",
            "difficulty": "MASTER",
            "artist": "technoplanet"
        },
        {
            "score": 30,
            "noteLamp": "LOSS",
            "bellLamp": "NONE",
            "matchType": "songTitle",
            "identifier": "Singularity",
            "difficulty": "MASTER"
        },
        {
            "score": 40,
            "noteLamp": "LOSS",
            "bellLamp": "NONE",
            "matchType": "songTitle",
            "identifier": "World Vanquisher",
            "difficulty": "MASTER"
        },
        {
            "score": 50,
            "noteLamp": "LOSS",
            "bellLamp": "NONE",
            "matchType": "songTitle",
            "identifier": "World Vanquisher",
            "artist": "void (Mournfinale)",
            "difficulty": "MASTER"
        }
    ]
}
zkrising commented 1 month ago

This feels ugly but it's definitely the path of least resistance. Thank you for sorting this out.