osuAkatsuki / bancho.py

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

bug: v1 api endpoint /get_replay appears to be incomplete #458

Closed skrungly closed 1 year ago

skrungly commented 1 year ago

Describe the bug

replays downloaded from v1/get_replay cannot be processed by the client, because the replay headers are missing regardless of the include_headers parameter. presumably, include_headers=True should return a functioning .osr file, but the server code seems to process it the other way around.

even with this in mind, specifying include_headers=False still provides the same incomplete replay file because the replay_data variable which contains the headers is never actually affixed to the raw replay file before it is sent off.

To Reproduce

  1. download the .osr file from https://api.skrungly.com/v1/get_replay?id=1447&include_headers=True (also ensure you have the map)
  2. import into your game
  3. stonks!

image

Expected behavior

when specifying include_headers=True, the .osr file should include headers.

bancho.py Version

latest

Python Version

3.9.X (Default)

Relevant log output

No response

Additional context

i understand that the v1 api is soon to be deprecated, but to my knowledge it is currently the only way to receive certain data (such as whole replay files) from the server, and so it should at least be functional in the meantime.

g1-1-1 commented 1 year ago

can you check to see if #459 fixes this for you? i run the changes in that PR on my main production server (example replay from the server and the map you'll need)

skrungly commented 1 year ago

yep! i looked but somehow didn't spot your PR in the works. literally just implemented a nearly-identical fix for my own server hehe.

banger of a map btw! :D

g1-1-1 commented 1 year ago

i had just made it ~5 minutes after you made this issue, so i can see how you missed it lol glad you found a fix on your own 👍