Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix online attribute flag in score performance command not retrieving…
… full difficulty attributes Found when investigating ppy/osu#28006. If the `performance score` command is given the `-a` flag, it is supposed to use the current online beatmap difficulty attributes. It does so by querying API, which queries `osu-beatmap-difficulty-cache`. Problem is, that some of the difficulty attributes, namely the ones that are already present on `APIBeatmap`, are not serialised out by `osu-beatmap-difficulty-cache`: https://github.com/ppy/osu-beatmap-difficulty-lookup-cache/blob/db2203368221109803f2031788da31deb94e0f11/BeatmapDifficultyLookupCache/DifficultyCache.cs#L125-L128 `osu-tools` is blissfully unaware of this, and as such attempts to deserialise the difficulty attributes returned from cache-then-web raw, which leads to it just using the default values (e.g. zeroes) for attributes that the difficulty lookup cache does not serialise out. This leads to obviously bogus results. To fix, retrieve the `APIBeatmap` manually and do some (admittedly gnarly) grafting in order to produce a fully populated object. It's a bit ugly but it works locally without further changes so maybe fine?
- Loading branch information