1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00
Commit Graph

32 Commits

Author SHA1 Message Date
Dean Herbert
0ab0c52ad5 Automated pass 2023-06-24 01:00:03 +09:00
Bartłomiej Dach
3c0b8af8f1
Allow unsubscribing from solo statistics updates
This is more of a safety item. To avoid potential duplicate key in
dictionary errors (and also avoid being slightly memory-leaky), allow
`SoloStatisticsWatcher` consumers to dispose of the subscriptions they
take out.
2022-12-28 08:07:48 +01:00
Bartłomiej Dach
a0a26b1e8c
Ignore statistics update subscriptions with invalid score ID
If score submission fails, the score will not receive a correct online
ID from web, but will still be passed on to the solo statistics watcher
on the results screen. This could lead to the watcher subscribing to
changes with score ID equal to the default of -1. If this happened more
than once, that would cause a crash due to duplicate keys in the
`callbacks` dictionary.

Closes #21837.
2022-12-28 07:54:01 +01:00
Bartłomiej Dach
e9d32fca18
Fix various failures in initial statistics fetch
- If the local user is restricted, then attempting to fetch their data
  from the `/users` endpoint would result in an empty response.

- Even if the user was successfully fetched, their `RulesetsStatistics`
  may not be populated (and instead be `null`). Curiously this was not
  picked up by static analysis until the first issue was fixed.

Closes #21839.
2022-12-28 07:31:36 +01:00
Bartłomiej Dach
78c47a3695
Add callback to dictionary rather than overwrite
Attempting to overwrite will henceforth throw an exception.
2022-12-24 13:45:04 +01:00
Bartłomiej Dach
6c4ca387e0
Fix wrong handling of missing ruleset statistics 2022-12-24 13:44:11 +01:00
Bartłomiej Dach
3c26016b61
Ensure latest stats are cleared on successful profile fetch 2022-12-24 13:44:08 +01:00
Bartłomiej Dach
fd9110a61e
Fix solo statistics watcher firing requests for invalid user with id 1
Can happen during login flow (see `APIAccess.attemptConnect()`).
2022-12-24 13:44:05 +01:00
Bartłomiej Dach
d6e079a2b4
Ignore statistics update requests from third-party rulesets for now 2022-12-24 13:43:57 +01:00
Bartłomiej Dach
fa2d50fe31
Limit tracking unhandled scores to just the last one 2022-12-22 19:59:39 +01:00
Bartłomiej Dach
48dc2332fd
Refactor test to be easier to work with 2022-12-22 19:59:35 +01:00
Bartłomiej Dach
ac872fac9e
Implement solo statistics watcher 2022-12-22 19:59:07 +01:00
Bartłomiej Dach
f5b3988dd2
Add data structure for delivering statistics updates 2022-12-22 08:01:59 +01:00
Salman Ahmed
1b6ebcfd87 Remove SubmittableScore and replace with SoloScoreInfo extension method 2022-07-25 13:43:43 +03:00
Salman Ahmed
d04df19c7e Remove APIScore and replace its final usage 2022-07-25 13:13:46 +03:00
Dean Herbert
634b6cdbbe Send beatmap has to server on solo score request
Right now, the client does nothing to ensure a beatmap is in a valid
state before requesting to submit a score. There is further work to be
done client-side so it is more aware of this state (already handled for
playlists, but not for the solo gameplay loop), but the solution I have
in mind for that is a bit more involved.

This is not used server-side yet, but I want to get this sending so we
can start using it for some very basic validation.

Will resolve the basic portion of #11922 after implemented server-side.
2022-07-02 12:16:17 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
b0f40d9e45 Remove user from SubmittableScore
This wasn't being used by osu-web, and included far too much unnecessary
data. Of note, `pp` and `ruleset_id` are also not strictly required, but
there's no harm in sending them so I've left them be for now.
2022-03-08 18:38:24 +09:00
Dean Herbert
beb3731c0b Standardise and combine base implementation of score submission requests
These share too much yet have very different constructor signatures and
property exposure. Just a clean-up pass as I begin to look at replay
submission.
2022-02-11 15:53:47 +09:00
Dean Herbert
de076678fe Fix some remaining test failures 2022-01-12 17:00:16 +09:00
Dean Herbert
aac2aa341c Update some more incorrect types for primary key access/set 2022-01-12 16:57:27 +09:00
Dean Herbert
2a4bee61dd Update many score-related classes to move closer to being able to persist to realm 2022-01-12 16:57:27 +09:00
Bartłomiej Dach
84765b99b3
Handle score submission request in submission test scene
Was previously not handled at all, therefore displaying request failures
in the test log output. While that was mostly a red herring and
shouldn't have caused any actual *test* failures, it is still better to
handle this explicitly in a realistic manner.
2022-01-06 12:57:26 +01:00
Dan Balasescu
7564658b5e Reduce to 30s 2021-12-14 06:40:45 +09:00
Dan Balasescu
fd979a52fe Increase score submission request timeout to 60s 2021-12-13 07:15:21 +09:00
Dean Herbert
bff02bedbf Rename APIScoreInfo to APIScore 2021-12-10 16:11:49 +09:00
Dean Herbert
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
Dean Herbert
f68d6dbc8f Update score submission serialisation tests to use SubmittableScore 2021-10-29 14:32:31 +09:00
Dean Herbert
54073d8a1e Isolate score submissions model and remove serialisation from ScoreInfo 2021-10-29 14:13:43 +09:00
Dean Herbert
51fee79ef1 Fix scores not being accepted due to missing ruleset ID 2021-04-09 15:18:02 +09:00
Dean Herbert
24ae5b9169 Fix slightly incorrect solo score submission routes 2021-04-08 23:15:08 +09:00
Dean Herbert
5267fb74c4 Add submission requests 2021-03-23 18:18:49 +09:00