1
0
mirror of synced 2024-11-28 00:20:53 +01:00
This commit is contained in:
asesidaa 2022-10-27 00:42:41 +08:00
parent e55230dc91
commit a5d2db22cc
16 changed files with 56 additions and 59 deletions

View File

@ -26,6 +26,7 @@ namespace GameDatabase.Context
{ {
return; return;
} }
var path = Path.Combine(PathHelper.GetRootPath(), "taiko.db3"); var path = Path.Combine(PathHelper.GetRootPath(), "taiko.db3");
optionsBuilder.UseSqlite($"Data Source={path}"); optionsBuilder.UseSqlite($"Data Source={path}");
} }

View File

@ -10,7 +10,8 @@ public class DateTimeConverter : JsonConverter<DateTime>
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {
Debug.Assert(typeToConvert == typeof(DateTime)); Debug.Assert(typeToConvert == typeof(DateTime));
var dateTime = DateTime.ParseExact(reader.GetString() ?? string.Empty, "dd_MM_yy-HH_mm_ss", CultureInfo.InvariantCulture); var dateTime = DateTime.ParseExact(reader.GetString() ?? string.Empty, "dd_MM_yy-HH_mm_ss",
CultureInfo.InvariantCulture);
return dateTime; return dateTime;
} }

View File

@ -4,6 +4,5 @@ namespace LocalSaveModScoreMigrator;
public class MusicInfo public class MusicInfo
{ {
[JsonPropertyName("items")] [JsonPropertyName("items")] public List<MusicInfoEntry> Items { get; set; } = new();
public List<MusicInfoEntry> Items { get; set; } = new();
} }

View File

@ -4,9 +4,7 @@ namespace LocalSaveModScoreMigrator;
public class MusicInfoEntry public class MusicInfoEntry
{ {
[JsonPropertyName("id")] [JsonPropertyName("id")] public string Id { get; set; } = string.Empty;
public string Id { get; set; } = string.Empty;
[JsonPropertyName("uniqueId")] [JsonPropertyName("uniqueId")] public uint SongId { get; set; }
public uint SongId { get; set; }
} }

View File

@ -8,13 +8,11 @@ public class PlayRecordJson
public string SongId { get; set; } = "tmap4"; public string SongId { get; set; } = "tmap4";
public Difficulty Difficulty { get; set; } public Difficulty Difficulty { get; set; }
[JsonPropertyName("dateTime")] [JsonPropertyName("dateTime")] public DateTime DateTime { get; set; }
public DateTime DateTime { get; set; }
public uint Score { set; get; } public uint Score { set; get; }
public CrownType Crown { get; set; } public CrownType Crown { get; set; }
[JsonPropertyName("scorerank")] [JsonPropertyName("scorerank")] public ScoreRank Scorerank { get; set; }
public ScoreRank Scorerank { get; set; }
public uint Good { get; set; } public uint Good { get; set; }
public uint Ok { get; set; } public uint Ok { get; set; }
public uint Bad { get; set; } public uint Bad { get; set; }