Commit Graph

1602 Commits

Author SHA1 Message Date
Dean Herbert d836dba982
Rename and xmldoc `RealmResetEmptySet` 2024-10-09 14:18:34 +09:00
Bartłomiej Dach b811b9baf6
Fix `DetachedBeatmapStore` special condition for detecting resets from blocking all operations failing on empty databases
See https://discord.com/channels/188630481301012481/188630652340404224/1293309912591368244.
2024-10-08 23:16:17 +02:00
Dean Herbert 8773c34fdd
Rename enum to non-plural now that it won't conflict 2024-10-01 19:55:46 +09:00
Dean Herbert ad3007eaad
Adjust `ILocalUserPlayInfo` to expose whether gameplay is in a paused/break state 2024-10-01 17:53:46 +09:00
Dean Herbert 562a5006ea
Change log output to only output when matches are found (in line with other methods) 2024-09-14 02:19:52 +09:00
Bartłomiej Dach a4f6d4a300
Backpopulate missing ranked/submitted dates using new local metadata cache
People keep asking why https://github.com/ppy/osu/pull/29553 didn't fix
their databases (as stated in the PR, it didn't intend to), so this
should do it for them.
2024-09-13 16:00:49 +02:00
Dean Herbert 36a30cf077
Add note about using hard links in the future 2024-09-06 16:01:47 +09:00
Dean Herbert de208fd5c3
Add very basic error handling for failed beatmap detach 2024-08-30 18:50:03 +09:00
Dean Herbert 2033a5e157
Add disposal of `ManualResetEventSlim` 2024-08-30 18:50:02 +09:00
Dean Herbert d1d2591b67
Fix realm changes being applied before detach finishes 2024-08-29 18:42:43 +09:00
Dean Herbert 9123d2cb7f
Fix multiple test failures 2024-08-28 23:28:43 +09:00
Dean Herbert c2c1dccf2d
Detach beatmap sets asynchronously 2024-08-28 19:13:49 +09:00
Dean Herbert 081c9eb21b
Fix incorrect cancellation / disposal handling of `DetachedBeatmapStore` 2024-08-28 17:21:19 +09:00
Dean Herbert 4d42274771
Use bindable list implementation 2024-08-28 16:03:37 +09:00
Dean Herbert 466ed5de78
Add basic detached beatmap store 2024-08-28 16:03:37 +09:00
clayton 8e63c17536
Apply CodeFactor lint 2024-08-07 15:02:53 -07:00
clayton 93e193d719
Add realm migration to remap key bindings 2024-08-07 14:36:04 -07:00
Bartłomiej Dach 7ba1f142e5
Fix rank upgrade path upgrading scores that failed background reprocessing earlier 2024-07-16 14:04:51 +02:00
Dean Herbert 6cee0210c3
Fix(?) xmldoc 2024-07-10 19:22:49 +09:00
Dean Herbert 704e7e843f
More xmldoc across new methods and classes 2024-07-10 18:34:48 +09:00
Dean Herbert d3c66e2404
Add basic flow for mounting beatmaps for external editing 2024-07-10 18:29:51 +09:00
Dean Herbert ee9e329db3
Inhibit original callback from firing when sending initial changeset 2024-07-09 16:05:58 +09:00
Dean Herbert 2423bbb776
Ensure realm subscriptions always fire initial callback with null `ChangeSet`
We expect this to be the case, but it turns out that it [may be
coalesced](https://www.mongodb.com/docs/realm-sdks/dotnet/latest/reference/Realms.IRealmCollection-1.html#Realms_IRealmCollection_1_SubscribeForNotifications_Realms_NotificationCallbackDelegate__0__Realms_KeyPathsCollection_):

> Notifications are delivered via the standard event loop, and so can't
> be delivered while the event loop is blocked by other activity. When
> notifications can't be delivered instantly, multiple notifications may
> be coalesced into a single notification. This can include the
> notification with the initial collection.

Rather than struggle with handling this locally every time, let's fix
the callback at our end to ensure we receive the initial null case.

I've raised concern for the API being a bit silly with realm
(https://github.com/realm/realm-dotnet/issues/3641).
2024-07-09 15:47:43 +09:00
Dean Herbert 5350945340
Update `HasFlag` usages 2024-07-03 00:19:04 +09:00
Dan Balasescu 276d8fe158
Truncate break times for legacy beatmap export 2024-06-26 16:20:56 +09:00
Bartłomiej Dach daee363743
Merge branch 'master' into total-score-without-mods-once-more 2024-05-27 15:16:58 +02:00
Dean Herbert d0b1ebff5a
Revert "Temporary rollback of framework / SDL3"
This reverts commit d7d569cf4e.
2024-05-22 16:29:39 +08:00
Bartłomiej Dach 45fcbea182
Compute total score without mods during standardised score conversion
This is going to be used by server-side flows. Note that the server-side
overload of `UpdateFromLegacy()` was not calling
`LegacyScoreDecoder.PopulateTotalScoreWithoutMods()`.

Computing the score without mods inline reduces reflection overheads
from constructing mod instances, which feels pretty important for
server-side flows.

There is one weird kink in the treatment of stable scores with score V2
active - they get the *legacy* multipliers unapplied for them because
that made the most sense. For all intents and purposes this matters
mostly for client-side replays with score V2. I'm not sure whether
scores with SV2 ever make it to submission in stable.

There may be minute differences in converted score due to rounding
shenanigans but I don't think it's worth doing a reverify for this.
2024-05-21 13:11:08 +02:00
Dean Herbert d7d569cf4e
Temporary rollback of framework / SDL3 2024-05-21 14:36:16 +08:00
Bartłomiej Dach be642c8c42
Fix total score without mods migration failing on custom ruleset scores when custom ruleset cannot be loaded
Closes https://github.com/ppy/osu/issues/28209.

Yes this means that such scores will have a zero total score without
mods in DB and thus might up getting their total recalculated to zero
when we try a mod multiplier rebalance (unless we skip scores with zero
completely I suppose). I also don't really care about that right now.
2024-05-19 09:43:33 +02:00
Salman Ahmed 4cf6ab40f6 Use `MustDisposeResource` annotation to appease ReSharper inspections 2024-05-11 22:33:18 +03:00
Bartłomiej Dach c9414da5d4
Merge branch 'master' into pre-mod-multiplier-score 2024-05-08 13:39:44 +02:00
Bartłomiej Dach 82d1ebbd20
Merge branch 'master' into fix-zip-encoding 2024-04-30 16:30:15 +02:00
Dean Herbert 6a7e2dc258
Fix formatting 2024-04-30 21:47:03 +08:00
Dean Herbert a3213fc36d
Change `.olz` to use UTF-8 encoding 2024-04-30 21:40:04 +08:00
Dean Herbert 0bfad74907
Move realm error handling to avoid triggering in test scenarios 2024-04-30 14:09:29 +08:00
Dean Herbert a8416f3572
Move `exists` check inside retry operation
Might help?
2024-04-30 12:39:18 +08:00
Dean Herbert c8f7f2215b
Force encoding to Shift-JIS for archive filenames
After way too much time investigating this, the encoding situation is
not great right now.

- Stable sets the "default code page" to be used for encoding filenames
to Shift-JIS (932):
c29ebd7fc5/osu!/GameBase.cs#L3099
- Lazer does nothing (therefore using UTF-8).

When importing to lazer, stable files are assumed to be UTF-8. This
means that the linked beatmaps don't work correctly. Forcing lazer to
decompress *and* compress using Shift-JIS will fix this.

Here's a rough idea of how things look for japanese character filenames
in current `master`:

| | stable | lazer |
|--------|--------|--------|
| export encoding | shift-jis | utf8 |
| utf8 [bit flag](https://superuser.com/a/1507988) set |  |  |
| import stable export osz |   |  |
| import lazer export osz |  |  |
| windows unzip |  |  |
| macos unzip |  |  |

and after this change

| | stable | lazer |
|--------|--------|--------|
| export encoding | shift-jis | shift-jis |
| utf8 [bit flag](https://superuser.com/a/1507988) set |  |  |
| import stable export osz |   |  |
| import lazer export osz |  |  |
| windows unzip |  |  |
| macos unzip |  |  |

A future endeavour to improve compatibility would be to look at setting
the utf8 flag in lazer, switching the default to utf8, and ensuring the
stable supports this flag (I don't believe it does right now).
2024-04-30 01:27:47 +08:00
Dean Herbert a3d239c11a
Remove unused method 2024-04-29 18:48:07 +08:00
Dean Herbert 1c1ee22aa7
Add retry attempts to hopefully fix windows tests runs 2024-04-29 14:17:48 +08:00
Dean Herbert a4bc5a8fc9
Use helper method for backup retry attempts 2024-04-29 10:35:37 +08:00
Dean Herbert b262497083
Check realm file can be written to before attempting further initialisation
Rather than creating a "corrupt" realm file in such cases, the game will
now refuse to start. This behaviour is usually what we want. In most
cases a second click on the game will start it successfully (the
previous instance's file handles are still doing stuff, or windows
defender is being silly).

Closes https://github.com/ppy/osu/issues/28018.
2024-04-28 19:07:39 +08:00
Bartłomiej Dach 12acdeebf1
Merge pull request #27866 from Joehuu/fix-online-score-export
Fix replay export not working correctly from online leaderboards
2024-04-23 09:08:04 +02:00
Bartłomiej Dach 18bb81e7a7
Populate total score without mods when performing standardised score migration 2024-04-17 09:11:47 +02:00
Bartłomiej Dach 2f1a4cdaa4
Export and import `TotalScoreWithoutMods` to replays (or recalculate if it missing) 2024-04-17 09:08:15 +02:00
Bartłomiej Dach 6b0d577f0b
Add backmigration of `TotalScoreWithoutMods` for existing scores 2024-04-17 08:52:27 +02:00
Bartłomiej Dach a386068ed3
Add `ScoreInfo.TotalScoreWithoutMods` 2024-04-17 08:51:53 +02:00
Dean Herbert a651cb8d50
Stop background processing from running when inside a high performance session 2024-04-16 10:04:38 +08:00
Joseph Madamba f282152f99 Enable NRT to `ScoreManager` 2024-04-14 15:53:29 -07:00
Bartłomiej Dach 3d8fdc52a4
Merge pull request #27501 from turbedi/throw_helper
Use ThrowHelper methods in more places
2024-03-07 11:36:21 +01:00