ppy / osu-api

Public API for accessing osu! related data.
320 stars 16 forks source link

Incorrect diff_size for converted mania maps #257

Closed grumd closed 5 years ago

grumd commented 5 years ago

Coverted mania maps return standard circle size instead of key count for mania Example: https://osu.ppy.sh/api/get_beatmaps?k=API_KEY&b=1562486&limit=1&m=3&a=1 https://osu.ppy.sh/beatmapsets/740641#mania/1562486

It should return diff_size: 7 instead of diff_size: 4.5

peppy commented 5 years ago

I'm not 100% sure we support this at a database level. @smoogipoo might know better than me (does osu-stable diffcalc correctly output convert key counts these days? do we need to run a reprocess?)

smoogipoo commented 5 years ago

Yeah it's not quite exact for converts, there's a few heuristics to determine the keys based on other difficulty attributes.

The actual amount of keys isn't populated in the DB at all at the moment, but we could maybe implement the heuristics via https://github.com/ppy/osu/blob/0e8517ebaedda65f1b3f30a134c911a3add99dbf/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs#L48 in osu-web?

grumd commented 5 years ago

@smoogipoo https://github.com/ppy/osu-web/pull/3276/files Not sure how helpful is this link to you, but I found this. osu-web already has some code to calculate it.

smoogipoo commented 5 years ago

Yeah that's the one we should be using. cc @nanaya

peppy commented 5 years ago

Closing this as not-planned in api v1 (the implementation is not so simple). It will 100% be there in api v2, which will have full documentation in the very near future.