1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 12:02:57 +08:00
Commit Graph

18 Commits

Author SHA1 Message Date
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
6c385ccd29 Move second generic to abstract model downloader rather than interface type 2021-11-05 17:37:05 +09: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
smoogipoo
d985b8ab2a Increase beatmapset download timeout 2021-02-22 17:14:39 +09:00
naoey
4b46601eae
Remove redundant variable, handle all request failures 2019-06-19 19:43:09 +05:30
Dean Herbert
c591a6f1fa Rename request type to be less verbose 2019-06-12 13:30:23 +09:00
naoey
06a558c4b7
Remove unecessary third generic and change usages to match 2019-06-11 21:11:30 +05:30
naoey
341d137f5c
Make BeatmapManager inherit from new base class 2019-06-11 19:36:08 +05:30
Dean Herbert
b69a19f810 Attach progress immediately 2019-01-31 19:08:45 +09:00
Dean Herbert
327a34f12a Merge remote-tracking branch 'upstream/master' into download-tracking-component
# Conflicts:
#	osu.Game/Beatmaps/Drawables/BeatmapSetDownloader.cs
2019-01-31 18:45:09 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Dean Herbert
21e79f51b1 Remove necessity of BeatmapSetDownloader 2019-01-18 14:28:06 +09:00
Dean Herbert
32a74f95a5 Normalize all the line endings 2018-04-13 18:26:38 +09:00
Dean Herbert
37d393bca0 Update licence headers 2018-01-05 20:21:19 +09:00
Unknown
16e48ed187 Hook up download logic with BeatmapSetOverlay download buttons.
- Add noVideo option to DownloadBeatmapSetRequest
- Make Download fire an event with new download instead of returning it
2017-11-12 18:41:10 +05:30
naoey
5f5dd54f9d Use a List instead of a Dictionary. 2017-09-09 09:56:01 +05:30
naoey
20becbe576 Use the specifically created progress action, add license header. 2017-09-09 01:53:42 +05:30
naoey
20f93c83d6
Make downloads happen in BeatmapManager. 2017-09-09 00:57:40 +05:30