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

727 Commits

Author SHA1 Message Date
Dean Herbert
185ea776f5 Fix incorrect authorisation loss exception handling with recent changes 2021-07-30 18:11:40 +09:00
Dean Herbert
3a5324c947 Fix aborting an APIRequest potentially resulting in incorrect success 2021-07-29 13:01:52 +09:00
Dean Herbert
1ed4fdd5f5 Avoid deserialisation JSON request content when error is not present (or not relevant) 2021-07-28 20:13:40 +09:00
Dean Herbert
bb3747ffc9 Fix beatmap search requests double-escaping
Closes #14008.
2021-07-25 17:06:40 +09:00
Dean Herbert
17168b8137 Fix authentication loss not handled correctly
This handles the case where on initial API connection, the server
responds with an `Unauthorized` response. It doesn't perform this same
checking/handling on every API request, which is probably what we want
eventually.

Opting to not address the full issue because I know this is going to be
a long one (see
05c50c0f6c/osu.Game/Online/API/APIAccess.cs (L233)).
2021-07-23 19:03:19 +09:00
Dean Herbert
57e5f5575a Fix derived API request types firing success when they shouldn't
The usual case of `virtual`/`override` being dangerous when logic is
added to the base implementation. As such, I've removed this completely.
2021-07-22 14:23:27 +09:00
Dan Balasescu
747c475b95
Merge pull request #13932 from peppy/fix-multiple-request-completion-states
Fix API request potentially firing failed events after completion
2021-07-21 15:11:03 +09:00
Bartłomiej Dach
1e634d9db0
Adjust user beatmap sections on profile overlay to match web 2021-07-20 21:55:17 +02:00
Dean Herbert
80c2b1449b Fix API request potentially firing failed events after completion
Specifically, `Cancel()` calls were not thread safe. Due to a series of
events, `ListPollingComponent` could call `Cancel` from a non-update
thread, leading to a race condition where both a `Success` and `Fail`
event can be fired.

This is intended to be the simplest fix possible, locking and guarding
specifically on the callbacks. Further work could be done in the future
to improve the flow surrounding `pendingFailure`, potentially reducing
redundant work and cleaning up the code, but that's not happening here.

Closes https://github.com/ppy/osu/issues/13632.
2021-07-19 20:27:01 +09:00
PercyDan54
e1c646b9b2
Remove redundant arguments 2021-07-05 23:52:39 +08:00
smoogipoo
ca0eaab8e2 Add test 2021-06-29 16:30:46 +09:00
Dean Herbert
26312bf60a
Merge branch 'master' into chat-mention 2021-06-11 20:03:44 +09:00
Dean Herbert
061e3d7f26 Move legacy ScoreInfo to be completely based on presence of classic mod 2021-06-08 18:00:09 +09:00
Craftplacer
5e44329e0b
Add DummyAPIAccess request handler
Make CreateChannelRequest.channel public
2021-06-05 14:43:26 +02:00
Gagah Pangeran Rosfatiputra
d4013bd885
add GetWikiRequest 2021-04-20 16:40:30 +07:00
Gagah Pangeran Rosfatiputra
f3555ad08c
add APIWikiPage response 2021-04-20 16:12:32 +07:00
Dean Herbert
9267d23dc2 Make year nullable rather than defaulting to zero 2021-05-20 15:23:49 +09:00
Andrei Zavatski
16ffedde8a Add year parameter to GetNewsRequest 2021-05-19 15:17:57 +03:00
Andrei Zavatski
881d82ccb6 Merge remote-tracking branch 'refs/remotes/ppy/master' into news-sidebar-new 2021-05-15 19:08:48 +03:00
Bartłomiej Dach
5b2b701915 Ignore possible null in GetResponseString()
A null there indicates a deserialisation error and therefore due to the
catch block immediately succeeding the changed line everything will
continue to work as intended.
2021-05-15 00:09:34 +02:00
Andrei Zavatski
4b97224932 Implement NewsSideBar component 2021-05-10 09:53:52 +03:00
Bartłomiej Dach
fe86ee629e Fix temp files from beatmap listing imports not being cleaned up
As reported in #12718, it turns out that temporary files from beatmap
set downloads performed via the beatmap listing overlay could remain in
the user's filesystem even after the download has concluded.

The reason for the issue is a failure in component integration.
In the case of online downloads, files are first downloaded to a
temporary directory (`C:/Temp` or `/tmp`), with a randomly generated
filename, which ends in an extension of `.tmp`.

On the other side, `ArchiveModelManager`s have a `ShouldDeleteArchive()`
method, which determines whether a file should be deleted after
importing. At the time of writing, in the case of beatmap imports the
file is only automatically cleaned up if the extension of the file is
equal to `.osz`, which was not the case for temporary files.

As it turns out, `APIDownloadRequest` has a facility for adjusting the
file's extension, via the protected `FileExtension` property. Therefore,
use it in the case of `DownloadBeatmapSetRequest` to specify `.osz`,
which then will make sure that the `ShouldDeleteArchive()` check in
`BeatmapManager` picks it up for clean-up.
2021-05-08 17:09:14 +02:00
Salman Ahmed
92fab653e1 Take current mod settings value into account on equality comparsion 2021-04-12 20:51:13 +03:00
Salman Ahmed
fbd5195738 Extract mod setting value handling to utils class 2021-04-12 03:37:03 +03:00
Salman Ahmed
18fb9f5ac9
Merge branch 'master' into mod-using-reference-equality 2021-04-11 19:48:55 +03:00
Max Hübner
aa2c1ee85e Add new beatmap search filter row "General" 2021-03-25 23:20:10 +01:00
Dean Herbert
aeff9bd853 Add return bool to HandleRequest to better trigger failures 2021-03-23 18:17:29 +09:00
Dean Herbert
ce452565f4 Avoid firing any kind of failures after success 2021-03-23 17:50:31 +09:00
Dean Herbert
f5ba746ae5 Fail all API requests sent to DummyAPIAccess
Until now, API requests sent to dummy API were just lost in the void. In most cases this somehow worked as expected, but any logic which is waiting on a request to finish will potentially never get a response.

Going forward, I'm not 100% sure that every `Wait` on a web response will have local timeout logic (I think there is a certain amount of assumption that this is being managed for us by `APIAccess`), so I've made this change to better handle such cases going forward. Now, rather than nothing happening, requests will trigger a failure via the existing exception logic rather than silently pretending the request never arrived.
2021-03-23 17:37:45 +09:00
smoogipoo
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
Dean Herbert
765cc5cf37 Remove iOS multiplayer blocking code 2021-03-08 14:35:22 +09:00
Dean Herbert
9ed8d902f7 Fix requests being indefinitely queued when user is offline 2021-02-24 19:57:42 +09:00
Dean Herbert
664d243003 Disable multiplayer/spectator on iOS until it can be supported again 2021-02-23 15:22:46 +09:00
smoogipoo
d985b8ab2a Increase beatmapset download timeout 2021-02-22 17:14:39 +09:00
smoogipoo
9a7b6ebe50 Fix missed occurrence 2021-02-17 14:30:52 +09:00
Dan Balasescu
6641f4d5a9
Merge branch 'master' into hub-send-version-hash 2021-02-15 21:12:46 +09:00
Dean Herbert
3562fddc27 Add missing nullability flag on CreateAccount return value 2021-02-15 17:02:07 +09:00
Dean Herbert
55d5d8d5be Send version hash on hub connection 2021-02-15 16:51:40 +09:00
Dean Herbert
9ad38ab20e Move HubClientConnector retrieval to IAPIProvider 2021-02-15 16:43:56 +09:00
smoogipoo
07b661e28c Add Messagepack support for serialising unknown bindable types 2021-02-10 23:44:06 +09:00
Dan Balasescu
a71d6a4c97
Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-05 12:25:36 +09:00
Dean Herbert
76cfeae7e9 Add support for Bindable int in config 2021-02-04 15:10:56 +09:00
Dean Herbert
e3d323989c Switch to SignalR 5.0 and implement using better API 2021-02-03 22:04:14 +09:00
Dean Herbert
1380717ebb Use PrimitiveObjectFormatter to simplify code 2021-02-03 20:19:27 +09:00
Dean Herbert
d3f056f188 Add missing licence header 2021-02-03 20:06:25 +09:00
Dean Herbert
75f1ebd5f9 Add custom resolver for mod settings dictionary 2021-02-03 19:46:47 +09:00
Dean Herbert
c73a05d0b5
Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-01 17:24:24 +09:00
Dan Balasescu
7d06af916c
Merge branch 'master' into add-messagepack 2021-01-27 13:00:46 +09:00
Dean Herbert
e4fc604163 Setup all multiplayer model classes for MessagePack support 2021-01-26 16:26:03 +09:00
Salman Ahmed
c317d60169 Add offline test scene for beatmap listing overlay 2021-01-26 00:03:20 +03:00