osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
212 stars 125 forks source link

Beatmap submission system #93

Open cmyui opened 3 years ago

cmyui commented 3 years ago

This one is pretty large compared to any other issues, it entails the implementation of the following handlers:

POST /web/osu-osz2-bmsubmit-post.php
POST /web/osu-osz2-bmsubmit-upload.php
GET /web/osu-osz2-bmsubmit-getid.php
GET /web/osu-get-beatmap-topic.php

along with writing a program to write osz2 files, and quite a few backend changes. I've already done a few hundred lines of code of this one, but it will likely not be implemented into master for a while to come.

Pure-Peace commented 3 years ago

Suggestion: after my experiment, ppy use i32 as beatmap id in osu, other beatmap id type will cause the beatmap can't be read, so we can use negative number as beatmap id. (-1 ~ -2147483648)

If we want different private servers to share each other's beatmap resources, we can consider making a submission site that uses negative numbers as beatmap ids.

cmyui commented 3 years ago

I think we have to use positive numbers though if we want osu-search-set to work, since osu!'s internal parser won't read the '-' properly.

https://user-images.githubusercontent.com/17343631/123728247-fd1e1800-d860-11eb-9847-7734a7004c1e.mp4

Pure-Peace commented 3 years ago

I think we have to use positive numbers though if we want osu-search-set to work, since osu!'s internal parser won't read the '-' properly.

q2oLv3glVGhYLx7dnobE.mp4

Oh, it does look like this is a problem. ppy's client has strange behavior.

Using positive numbers needs to avoid conflicts with existing maps, a bit tricky

cmyui commented 3 years ago

Yea, i think i’ll just end up either cutting int32 space in half and starting from halfway, or starting at 2147483647 and counting down.

Pure-Peace commented 3 years ago

Should work, these numbers are temporarily not used up lol

infernalfire72 commented 3 years ago

Another problem of using negative IDs is that the osu! client will straight up not submit the map if it receives a negative ID from the server