From e1c497f35a40b0b38cfaf39e6d97c04dfedcc2b0 Mon Sep 17 00:00:00 2001 From: LingFeng-bbben Date: Mon, 14 Oct 2024 01:50:57 +0800 Subject: [PATCH] fix: save score for online charts --- Assets/Script/Misc/Types/DataFormats/SongDetail.cs | 4 +++- Assets/Script/Utils/SongStorage.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Script/Misc/Types/DataFormats/SongDetail.cs b/Assets/Script/Misc/Types/DataFormats/SongDetail.cs index 94ee7110..1e87524c 100644 --- a/Assets/Script/Misc/Types/DataFormats/SongDetail.cs +++ b/Assets/Script/Misc/Types/DataFormats/SongDetail.cs @@ -213,7 +213,9 @@ public async Task DumpToLocal() } var info = new DirectoryInfo(dir); - return await ParseAsync(info.GetFiles()); + var song = await ParseAsync(info.GetFiles()); + song.Hash = Hash; + return song; } } diff --git a/Assets/Script/Utils/SongStorage.cs b/Assets/Script/Utils/SongStorage.cs index 0a9ca14e..0bf38b85 100644 --- a/Assets/Script/Utils/SongStorage.cs +++ b/Assets/Script/Utils/SongStorage.cs @@ -164,7 +164,7 @@ static async Task GetOnlineCollection(string apiroot) TrackPath = apiroot + "/Track/" + song.Id, BGPath = apiroot + "/ImageFull/" + song.Id, CoverPath = apiroot + "/Image/" + song.Id, - Hash = song.Id.ToString(), + Hash = song.Id.ToString()+"//" + song.Timestamp, AddTime = dateTime }; for (int i = 0; i < songDetail.Designers.Count(); i++)