1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:07:36 +08:00
Commit Graph

30 Commits

Author SHA1 Message Date
Dean Herbert
88d5e074a8 Rename lowPriority to batchImport 2022-06-15 00:46:00 +09:00
Dean Herbert
f11fe54385 Remove custom hash function flow 2022-06-15 00:42:30 +09:00
Dean Herbert
2f8290831a Skip quick import clause when importing a single item
Closes https://github.com/ppy/osu/issues/18600.
2022-06-15 00:26:34 +09:00
Dean Herbert
6250caca29 Remove duplicate implementation of same thing 2022-06-14 20:01:11 +09:00
Dean Herbert
e96c5ce703 Move and correct xmldoc to interfaces 2022-06-14 20:00:16 +09:00
Dean Herbert
84e526a2d9 Move methods around to make more sense 2022-06-14 20:00:08 +09:00
Dean Herbert
9f599a5ab4 Remove unused lowPriority flag from one Import method 2022-06-14 19:52:30 +09:00
Dean Herbert
336df62a1f Remove unnecessary file existence check
This is not required due to `createFileInfos` always being run before we
get to this point (I believe this was added after the initial code to
check existence was added).

This flow is covered in
`BeatmapImportTests.TestImportThenReimportAfterMissingFiles`, which
still passes with the change.

While this check isn't doing any harm, as I'm going through the flow for
import-skipping, less checks are appreciated.
2022-06-13 18:57:30 +09:00
Dean Herbert
56427becbb Move logging and early return into UndeleteForReuse method itself 2022-04-13 14:33:28 +09:00
Dean Herbert
6dbfc26158 Add log output when a model is undeleted 2022-04-12 18:23:38 +09:00
Dean Herbert
0fcb3bdba9 Fix beatmap date added not being updated on reimporting a soft deleted beatmap
Addresses concerns raised in https://github.com/ppy/osu/discussions/17399.
2022-03-22 14:10:36 +09:00
Dean Herbert
cd71ec0edd Remove ILive<> interface (and use abstract Live<> instead) 2022-01-26 13:38:56 +09:00
Dean Herbert
778d2a71b4 Remove Task from the inner-most Import method in RealmArchiveModelImporter
One of my pending work items for post-realm merge.

The lowest-level import task is no longer asynchronous, as we don't want
it to span multiple threads to allow easier interaction with realm.
Removing the `Task` spec simplifies a heap of usages.

Individual usages should decide whether they want to run the import
asynchronously, by either using an alternative override or spooling up a
thread themselves.
2022-01-25 15:30:29 +09:00
Dan Balasescu
bfa521bdd2
Merge pull request #16593 from peppy/realm-clean-up
Clean up realm naming
2022-01-25 14:33:53 +09:00
Dean Herbert
bbcc149e2e During import if files are found to be missing, ensure they are restored
This is one step closer to sanity in terms of physical files. As per the
comment I have left in place, we really should be checking file sizes or
hashes, but to keep things simple and fast I've opted to just cover the
"missing file" scenario for now.

Ran into this when testing against a foreign `client.realm` by:
- Noticing a beatmap doesn't load
- Deleting said beatmap
- Downloading via beatmap overlay
- Beatmap is restored but still doesn't work

Note that I've kept the logic where this will undelete an existing
import rather than create one from fresh, as I think that is beneficial
to the user (ie. it will still keep any linked scores on restore).
2022-01-25 13:44:54 +09:00
Dean Herbert
3e5c9e8436 Fix cases of Access instead of Realm 2022-01-25 12:58:15 +09:00
Dean Herbert
6eb2c28e41 Rename RealmContextFactory to RealmAccess 2022-01-24 20:38:07 +09:00
Dean Herbert
114c9e8c1f Update all usages of CreateContext to use either Run or Write 2022-01-21 17:27:08 +09:00
Dean Herbert
c61419dfe5 Fix scores not using correct filename/display strings
I've updated all cases where we should have been using
`GetDisplayString()` anyway, but left the `ToString()` implementations
in place for safety. They should probably be removed in the future.
2022-01-13 16:56:11 +09:00
Dean Herbert
bdb2979b2e Remove async from Populate method 2022-01-13 16:36:54 +09:00
Dean Herbert
88145dedf1 Remove oudated comments 2022-01-13 15:27:43 +09:00
Dean Herbert
441b7baa93 Provide a realm factory to usages of ToLive/RealmLive 2021-12-14 14:26:34 +09:00
Dean Herbert
6aad90674e Remove computeHashFast usage in RealmArchiveModelImporter.ComputeHash 2021-11-29 18:13:27 +09:00
Dean Herbert
2ee08b5f4c Fix undelete on existing not committing transaction 2021-11-29 14:48:31 +09:00
Dean Herbert
1d96542a2a Fix incorrect ConfigureAwait specification causing stalled test
This only occurs on upcoming changes I have (occurred when switching
existing skin import tests across to realm). Unsure why it was set to
`true`, seems like a weird oversight.
2021-11-26 12:47:43 +09:00
Dean Herbert
6fb2757739 Remove usage of Nuget.Packaging extension methods for IList.AddRange 2021-11-23 15:02:02 +09:00
Dean Herbert
59e763467f Move StoragePath implementation to an extension method 2021-11-19 16:08:38 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
75bfa705cf Remove unused method for now 2021-10-18 14:32:38 +09:00
Dean Herbert
0e1f144bf4 Rename ArchiveModelImporter with Realm prefix to avoid confusion 2021-10-15 17:08:43 +09:00