forum

API md5 might be wrong (or my code's broken)

posted
Total Posts
5
Topic Starter
The Bookbinder
Hi,

I'm trying to access beatmap data from the api, but I seem to be encountering an error. Maybe someone could try to reproduce. Here's some information I get back:


{"beatmapset_id":"420","beatmap_id":"2041","approved":"1","total_length":"91","hit_length":"89","version":"Hard","file_md5":"eebf77f343e3106c88710986153d3588","diff_size":"6","diff_overall":"5","diff_approach":"5","diff_drain":"5","mode":"0","count_normal":"141","count_slider":"29","count_spinner":"3","submit_date":"2007-12-11 15:59:55","approved_date":"2007-12-12 04:44:52","last_update":"2007-12-12 03:44:52","artist":"Nintendo","title":"Here We Go!","creator":"eyup","creator_id":"88","bpm":"100.1","source":"","tags":"","genre_id":"2","language_id":"5","favourite_count":"22","rating":"7.63052","download_unavailable":"0","audio_unavailable":"0","playcount":"27332","passcount":"7248","max_combo":"217","diff_aim":"1.5506","diff_speed":"1.41915","difficultyrating":"3.03548"},


Here's the issue: when I download the beatmapset with id 420, the file osu extracts has the following hash:

>>> print(hashlib.md5(open("E:\\nobackup\\OsuSongs\\420 Nintendo - Here We Go!\\Nintendo - Here We Go! (eyup) [Hard].osu", "rb").read()).hexdigest())

3863f6ad53e3139d876c084cd16ff758


Further, when this seems to happen, the osu client will ask you to update your map, even though you've just downloaded it. If you let it update the map, the hash is then the same
abraker

The Bookbinder wrote:

It seems to correspond for most of my other beatmaps.
By "correspond" you mean this is not an issue for most maps?
Topic Starter
The Bookbinder
Yes, for most maps, the md5 provided is the correct md5 for the file osu unpacks on disk. You can check https://osu.ppy.sh/beatmapsets/420#osu/2041 and verify that this is not the case. You will also notice that, even though you've just downloaded this, the osu client will ask you to update the map. If you do update the map, the hash will *then* correspond.

This might be a problem of stale files from downloads.
abraker
Might be worth making an issue regarding this on here https://github.com/ppy/osu-web/issues
Topic Starter
The Bookbinder
Good idea. https://github.com/ppy/osu-web/issues/5327

Closed as a known issue.
Please sign in to reply.

New reply