opl- / beatsaber-http-status

Live game status over web sockets.
MIT License
106 stars 36 forks source link

Fixed a problem with 'songHash' when the same map exists #44

Closed rynan4818 closed 4 years ago

rynan4818 commented 4 years ago

We have corrected the following Issues and confirmed that there are no problems. https://github.com/opl-/beatsaber-http-status/issues/43 Please correct any errors in the English text of your corrected comment.

ErisApps commented 4 years ago

I've quickly checked the new magic number against the beatsaver database dump that I keep in sync locally and it seems that 40 is indeed the only length for a songHash so far (across all 28141 currently existing beatmaps) so that number seems to be correct.

rynan4818 commented 4 years ago

The current value of songHash is the SHA-1 hash value that combines all the beatmap data into a It has become.

Example.

This map's songHash is a https://beatsaver.com/beatmap/93f9

Score Saber's ID says F3ED739066F90D59477B3E3F71 FC11E76963126B https://scoresaber.com/leaderboard/215433

You can use this map data in

copy /b info.dat + HardStandard.dat + ExpertStandard.dat + ExpertPlusStandard.dat + Lightshow.dat test.dat

The SHA-1 hash value of the file combined with the above command is the same as the ID.

image

The SHA-1 hash is a fixed 160-bit value, so a fixed value of 40 characters is fine.

opl- commented 4 years ago

Nice catch and thank you for the fix.