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 }