From f02b00fb6ac8a8a784696f17e4e9ffc6443876ec Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 8 Mar 2025 19:46:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20BeatLeader=20?= =?UTF-8?q?=E6=AD=8C=E6=9B=B2=20ID=20=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=81=A5=E5=A3=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/beatleader/bind_bl.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/beatleader/bind_bl.go b/service/beatleader/bind_bl.go index 6b0a0dd..2b8d1ed 100644 --- a/service/beatleader/bind_bl.go +++ b/service/beatleader/bind_bl.go @@ -354,7 +354,7 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er SongSubName: score.Leaderboard.Song.SubName, SongAuthorName: score.Leaderboard.Song.Author, SongHash: score.Leaderboard.Song.Hash, - SongId: score.Leaderboard.Song.ID[0:5], + SongId: "", CoverImage: score.Leaderboard.Song.CoverImage, DifficultyRaw: score.Leaderboard.Difficulty.DifficultyName, PP: score.Pp, @@ -372,6 +372,11 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er DeviceControllerRight: GetControllerStr(score.Controller), GeneratedTime: time.Unix(score.Timepost, 0).Format("2006-01-02 15:04:05.999999999-07:00"), } + if score.Leaderboard.Song.ID != "" && len(score.Leaderboard.Song.ID) > 5 { + dataLite.SongId = score.Leaderboard.Song.ID[0:5] + } else if score.Leaderboard.Song.ID != "" { + dataLite.SongId = score.Leaderboard.Song.ID + } if score.Leaderboard.Difficulty.Stars != nil { dataLite.Stars = *score.Leaderboard.Difficulty.Stars }