Commit Graph

377 Commits

Author SHA1 Message Date
f051720fa1 Fix score encoder being dependent on current culture
As it turns out, on some cultures, the "negative integer" sign is not
encoded using the U+002D HYPHEN-MINUS codepoint. For instance, Swedish
uses U+2212 MINUS SIGN instead. This was confusing the legacy decoder,
since it is correctly depending on the serialisation being
culture-independent.

To fix, ensure that the special "end replay" frame, as well as the
replay MD5 hash, are generated in a culture-invariant manner.

Thankfully the replay MD5 hash is currently being discarded in
`LegacyScoreDecoder`, so it changing in future scores should not have
any negative effect on lazer operation.
2021-12-04 17:13:43 +01:00
f712aeee01 Merge pull request #15795 from peppy/realm-integration/separate-download-flow
Split out download logic from main manager classes
2021-11-25 20:59:23 +09:00
8baf00c023 Remove unused using 2021-11-25 19:36:06 +09:00
d3a4890c31 Merge branch 'master' into realm-integration/stable-export-flow 2021-11-25 19:06:18 +09:00
eeccf836ec Remove unnecessary GameHost parameter 2021-11-25 17:42:41 +09:00
a2ab9f457d Move score download logic out of ScoreManager 2021-11-25 17:33:04 +09:00
cc1b91e4bd Split out legacy model export logic into LegacyModelExporter classes 2021-11-25 16:41:12 +09:00
7488ccd5fe Update all models to implement IHasNamedFiles 2021-11-25 16:41:12 +09:00
6d60725b31 Merge branch 'master' into realm-integration/stable-import-flow 2021-11-25 16:36:02 +09:00
6cab7b877d Move stable import handling into its own class 2021-11-25 15:36:58 +09:00
60b207f20a Reduce interface exposure of ScoreManager 2021-11-25 14:34:13 +09:00
ddbd4f9473 Merge branch 'master' into remove-model-file-list-inits 2021-11-24 18:39:01 +09:00
bbd3ea5b77 Update all actual usages of RulesetInfo.ID to use OnlineID instead 2021-11-24 15:50:26 +09:00
99a139dc98 Initialise all file lists at construction time (and remove setter) 2021-11-24 13:56:21 +09:00
a06b361fe2 Merge pull request #15705 from bdach/fix-difficulty-cache-caching-zeroes
Fix zero star difficulty values being cached when diffcalc was interrupted
2021-11-21 15:45:29 +09:00
15feb17da8 Change difficulty cache storage type to nullable
The recent changes related to adding support for working beatmap load
cancellation exposed a flaw in the beatmap difficulty cache. With the
way the difficulty computation logic was written, any error in the
calculation process (including beatmap load timeout, or cancellation)
would result in a 0.00 star rating being permanently cached in memory
for the given beatmap.

To resolve, change the difficulty cache's return type to nullable.
In failure scenarios, `null` is returned, rather than
`default(StarDifficulty)` as done previously.
2021-11-20 17:00:50 +01:00
eecf6ad558 Add IsManaged helper method to EF classes to match realm implementation 2021-11-19 21:56:06 +09:00
59e763467f Move StoragePath implementation to an extension method 2021-11-19 16:08:38 +09:00
9182eab486 Rename method + xmldoc 2021-11-17 20:45:48 +09:00
08f129b4c8 Expose LegacyScoreDecoder.CalculateAccuracy() 2021-11-17 20:09:30 +09:00
eba3cfc96e Move ScoreInfo string representation to extension method 2021-11-09 13:23:57 +01:00
78aef9ce86 Merge branch 'master' into remove-stupid-weak-reference-bindable-events 2021-11-08 13:35:49 +09:00
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
89cc2523ef Fix incorrectly specified events 2021-11-06 22:31:49 +09:00
2881ce0f5a Merge branch 'master' into remove-stupid-weak-reference-bindable-events 2021-11-06 14:08:39 +09:00
54f72d68ca Revert weird event flow in model manager/importers 2021-11-05 19:12:49 +09:00
6c385ccd29 Move second generic to abstract model downloader rather than interface type 2021-11-05 17:37:05 +09:00
1fe9bca819 Change ModelDownloader's requirement to an IModelImporter rather than IModelManager 2021-11-05 16:47:18 +09:00
b90f44493c Remove importer inheritance from IModelManager
Now only exists in legacy implementations, to reduce inheritance
complexity of interfaces which are going to be used going forwards.
2021-11-05 16:45:38 +09:00
b98faf6159 Merge branch 'master' into score-refactor/isolated-serialisation 2021-11-01 15:49:25 +09:00
19feae4a8e Merge branch 'master' into beatmap-refactor/download-tracker 2021-11-01 13:15:36 +09:00
b63a90966b Remove misplaced access modifier in interface specification
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2021-10-31 23:49:26 +09:00
e9ba1ea198 Mark IScoreInfo implementation with region 2021-10-30 15:08:45 +02:00
8053b2c320 Merge branch 'master' into score-refactor/isolated-serialisation 2021-10-30 15:07:34 +02:00
6e4f7af8d3 Mark IHasOnlineID implementation with region 2021-10-30 14:15:20 +02:00
cd7bd935f6 Remove Statistics from interface until we figure how to properly deserialise 2021-10-29 14:18:10 +09:00
54073d8a1e Isolate score submissions model and remove serialisation from ScoreInfo 2021-10-29 14:13:43 +09:00
1944c255a7 Implement score interfaces 2021-10-29 13:49:30 +09:00
49b5de64be Extract interface 2021-10-29 13:41:21 +09:00
34d4715220 Allow for long online IDs and implement in ScoreInfo 2021-10-29 11:48:36 +09:00
617e6febb6 Refactor ModelDownloader to allow for different OnlineID matching 2021-10-27 21:00:46 +09:00
9015ac6ba8 Implement new version of download tracker 2021-10-27 21:00:46 +09:00
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
b3219bb592 Update usages of OnlineID 2021-10-18 16:16:36 +09:00
e9c3d09e0e Remove redundant specs 2021-10-15 16:27:16 +09:00
6d6de5b677 Remove redundant tuple naming 2021-10-10 16:50:55 +09:00
4475697a9c Add score id key 2021-10-10 15:47:39 +09:00
c49d0a5013 Rewrite query to be easier to understand 2021-10-10 15:43:24 +09:00
b82ed3f167 Fix potential blocking operation on OrderByTotalScoreAsync()
In reality this wouldn't be a long process, but the blocking is really
noticeable if you add a Task.Delay(1000) in GetTotalScoreAsync().
2021-10-08 14:23:54 +09:00
4bd1083388 Merge pull request #14903 from peppy/importer-returns-live
Add `ILive<T>` and use as return type of `Import` methods
2021-10-04 20:16:32 +09:00