Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial beatmap submission support #31805

Merged
merged 23 commits into from
Feb 13, 2025
Merged

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Feb 5, 2025

2025-02-05.14-05-39.mp4

There will probably be follow-up fixes required for this, but this should be at least a minimal start required to start testing on staging.

Guest difficulty submission is not yet supported or exposed; this will require significant reworking of metadata management across the entire game first so that guest mappers become a first-class citizen everywhere.

@bdach bdach added area:editor notable feature Attach to pull requests which should be highlighted on the changelog. Things users want to read. labels Feb 5, 2025
@bdach bdach requested a review from peppy February 5, 2025 13:09
@bdach bdach self-assigned this Feb 5, 2025
@bdach bdach mentioned this pull request Feb 5, 2025
9 tasks
peppy added 8 commits February 7, 2025 17:44
These are historically only presented to the user when uploading a new
beatmap for the first time.
It seems that right now these timeouts do not check for actual data
movement, which is to say if a user with a very slow connection is
uploading and it takes more than `Timeout`, their upload will fail.

For now let's set these values high enough that most users will not be
affected.
@peppy
Copy link
Member

peppy commented Feb 7, 2025

@bdach I've pushed an initial round of fixes. I'll do a second pass when the flow can be tested on staging, but seems pretty decent.

@bdach
Copy link
Collaborator Author

bdach commented Feb 7, 2025

Thanks for the changes. They look mostly good, I had to fix one thing in 64f0d23 though.

The submission service on staging looks to be in a condition where it doesn't fail 100% of the time now, so I changed the development config to point at it now in de0aabb.

@peppy
Copy link
Member

peppy commented Feb 10, 2025

We might want some better messaging when errors occur. These can come after the merge of this initial work.

A few common scenarios I can think of:

Uploading a beatmap with incorrect online IDs:

osu! 2025-02-10 at 05 59 20

This isn't handled great in stable, but maybe we can offer a path to repair (like giving the user an option to upload as a new set, or attempting to link to the real upload, if it's really theirs).

Uploading someone else's beatmap

osu! 2025-02-10 at 06 01 34

Currently errors very late into the process, and with a nondescript error message.

@peppy
Copy link
Member

peppy commented Feb 10, 2025

I get this won't be a huge improvement (it still looks horrible...), but is there a reason we are going all the way back to menu for the present operation?

ie can we do this instead? it seeems to work

diff --git a/osu.Game/Screens/Edit/Submission/BeatmapSubmissionScreen.cs b/osu.Game/Screens/Edit/Submission/BeatmapSubmissionScreen.cs
index 121e25d8b7..9672e4360a 100644
--- a/osu.Game/Screens/Edit/Submission/BeatmapSubmissionScreen.cs
+++ b/osu.Game/Screens/Edit/Submission/BeatmapSubmissionScreen.cs
@@ -28,7 +28,7 @@
 using osu.Game.Online.API.Requests.Responses;
 using osu.Game.Overlays;
 using osu.Game.Overlays.Notifications;
-using osu.Game.Screens.Menu;
+using osu.Game.Screens.Select;
 using osuTK;
 
 namespace osu.Game.Screens.Edit.Submission
@@ -418,7 +418,7 @@ public override bool OnExiting(ScreenExitEvent e)
                     }
 
                     s.Push(new EditorLoader());
-                }, [typeof(MainMenu)]);
+                }, [typeof(SongSelect)]);
 
                 return false;
             }

@bdach
Copy link
Collaborator Author

bdach commented Feb 10, 2025

Uploading a beatmap with incorrect online IDs
This isn't handled great in stable, but maybe we can offer a path to repair (like giving the user an option to upload as a new set, or attempting to link to the real upload, if it's really theirs).

Sure, I suppose.

Uploading someone else's beatmap
Currently errors very late into the process, and with a nondescript error message.

Problem with this one is what information do you base things on that the beatmap is indeed "someone else's". Stable used usernames for this which is 100% pointless and obviated by username changes. I guess I could use like the user ID from online metadata for this maybe?

ie can we do this instead? it seeems to work

Sure I guess. The reason why this specifies MainMenu is that you could enter editor from main menu. But MainMenu is always automatically appended to the list of valid screens to perform from:

validScreens = validScreens.Append(typeof(MainMenu));

so I guess your proposal works.

And yes it's pretty horrible. It's also the best that I can do without rewriting the entirety of editor to somehow support the beatmap being completely changed from under the user.

@peppy peppy merged commit 37db539 into ppy:master Feb 13, 2025
7 of 9 checks passed
@bdach bdach deleted the bss/the-actual-submission branch February 13, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editor notable feature Attach to pull requests which should be highlighted on the changelog. Things users want to read. size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to submit beatmaps to BSS
3 participants