Commit Graph

1006 Commits

Author SHA1 Message Date
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
92fab653e1 Take current mod settings value into account on equality comparsion 2021-04-12 20:51:13 +03:00
fbd5195738 Extract mod setting value handling to utils class 2021-04-12 03:37:03 +03:00
18fb9f5ac9 Merge branch 'master' into mod-using-reference-equality 2021-04-11 19:48:55 +03:00
aa2c1ee85e Add new beatmap search filter row "General" 2021-03-25 23:20:10 +01:00
aeff9bd853 Add return bool to HandleRequest to better trigger failures 2021-03-23 18:17:29 +09:00
ce452565f4 Avoid firing any kind of failures after success 2021-03-23 17:50:31 +09:00
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
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
765cc5cf37 Remove iOS multiplayer blocking code 2021-03-08 14:35:22 +09:00
9ed8d902f7 Fix requests being indefinitely queued when user is offline 2021-02-24 19:57:42 +09:00
664d243003 Disable multiplayer/spectator on iOS until it can be supported again 2021-02-23 15:22:46 +09:00
d985b8ab2a Increase beatmapset download timeout 2021-02-22 17:14:39 +09:00
9a7b6ebe50 Fix missed occurrence 2021-02-17 14:30:52 +09:00
6641f4d5a9 Merge branch 'master' into hub-send-version-hash 2021-02-15 21:12:46 +09:00
3562fddc27 Add missing nullability flag on CreateAccount return value 2021-02-15 17:02:07 +09:00
55d5d8d5be Send version hash on hub connection 2021-02-15 16:51:40 +09:00
9ad38ab20e Move HubClientConnector retrieval to IAPIProvider 2021-02-15 16:43:56 +09:00
07b661e28c Add Messagepack support for serialising unknown bindable types 2021-02-10 23:44:06 +09:00
a71d6a4c97 Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-05 12:25:36 +09:00
76cfeae7e9 Add support for Bindable int in config 2021-02-04 15:10:56 +09:00
e3d323989c Switch to SignalR 5.0 and implement using better API 2021-02-03 22:04:14 +09:00
1380717ebb Use PrimitiveObjectFormatter to simplify code 2021-02-03 20:19:27 +09:00
d3f056f188 Add missing licence header 2021-02-03 20:06:25 +09:00
75f1ebd5f9 Add custom resolver for mod settings dictionary 2021-02-03 19:46:47 +09:00
c73a05d0b5 Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-01 17:24:24 +09:00
7d06af916c Merge branch 'master' into add-messagepack 2021-01-27 13:00:46 +09:00
e4fc604163 Setup all multiplayer model classes for MessagePack support 2021-01-26 16:26:03 +09:00
c317d60169 Add offline test scene for beatmap listing overlay 2021-01-26 00:03:20 +03:00
5e476fa189 Enforce one missed property back to single-floating type 2021-01-18 22:07:25 +03:00
dc91cebce9 Merge branch 'master' into multiplayer-beatmap-tracker 2021-01-18 19:15:45 +03:00
b6a37c1c15 Make TriggerSuccess(filename) protected and expose in test instead 2021-01-17 22:10:30 +03:00
d93a853dfd Enforce float type in the download progress path instead 2021-01-17 21:16:48 +03:00
5fd644fc57 Unify variable names 2021-01-17 22:42:48 +09:00
adb2605d5d Enforce double type in the download progress path
Wasn't sure where to exactly put this, or whether to split it, but it's very small change to worry about, so I guess it's fine being here
2021-01-17 00:12:14 +03:00
23c7afa573 Expose method for setting progress of archive download request 2021-01-17 00:05:51 +03:00
4778686dc4 Expose method for triggering filename-backed success in APIDownloadRequest
Exactly like in `APIRequest<T>`
2021-01-17 00:01:11 +03:00
a5f99ed8e6 Merge branch 'explicit-beatmap-markers' into explicit-search-control 2021-01-13 12:53:57 +03:00
e8daea91d2 Add online beatmap "explicit content" property 2021-01-13 12:13:14 +03:00
249be461d5 Add "explicit maps" search filter control 2021-01-12 11:09:55 +03:00
6ad1b7767e Update osu.Game/Online/API/APIMod.cs
Co-authored-by: Salman Ahmed <slmanarendo1950@gmail.com>
2021-01-03 17:04:16 +09:00
99fa0e25dc Switch back to FirstOrDefault to allow for weird testing logic to pass 2021-01-03 16:46:24 +09:00
29dbb1cc0d Add internal pathway for ensuring correct application of bindable mods 2021-01-03 15:48:28 +09:00
23e216fa0b Simplify some default value checks (we are sure the return is an IBindable) 2021-01-03 15:47:15 +09:00
1a44338124 Use SingleOrDefault for added safety when looking up mod acronyms 2021-01-03 15:38:30 +09:00
dee694fd50 Merge branch 'master' into mod-using-reference-equality 2020-12-30 19:39:22 +01:00
03b78d1c4b Handle SocketExceptions and HttpRequestExceptions more silently
These can occur when a network connection is completely unavailable (ie.
host resolution failures are occurring). Currently these would appear as
important errors which spammed the notification overlay every retry
forever, while no network connection is available.

I also took this opportunity to remove a lot of `bool` passing which was
no longer in use (previously the fail count / retry process was
different to what we have today).
2020-12-29 16:22:11 +09:00
41b79d938b Fix wrong checks.. 2020-12-28 15:30:52 +03:00
5efcdbd431 Fix IMod now using reference equality as well 2020-12-28 15:19:28 +03:00
43f8f3638a Fix mod using reference equality unless casted to IMod 2020-12-27 02:42:13 +03:00