Closed jack3898 closed 5 months ago
I have written an open source npm package to address this, so this task is done. https://github.com/jack3898/osr-loader
Using the hash read from that file, I can determine the beatmap details using the Osu! api:
https://osu.ppy.sh/api/get_beatmaps?k=YOUR_API_KEY&h=MAP_HASH
Which will give me an important key, the beatmapset_id
, which I can construct a download URL with.
Then I will get a .osz
file, which is just zip file in disguise. I can unzip it, store it in a songs directory, then the renderer will use it.
The kubernetesd cluster when this is released will not have access to downloaded beatmaps, Danser requires local beatmaps to function. This step is quite complex, as the beatmap replay file is not a normal text file, needs parsing to extract beatmap details, so the service can download the song on the fly and use that for danser.