fix: 初始化 BeatLeader 和 ScoreSaber 歌曲哈希映射,防止空指针异常

This commit is contained in:
lixiangwuxian 2025-03-08 20:37:36 +08:00
parent 8b4866b4d3
commit d68f9c0e89
2 changed files with 2 additions and 0 deletions

View File

@ -369,6 +369,7 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error) {
//每批最多49个
hashToSongId = make(map[string]string)
batchSize := 49
for i := 0; i < len(hashs); i += batchSize {
end := i + batchSize

View File

@ -397,6 +397,7 @@ func (ss *ssQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error) {
//每批最多49个
hashToSongId = make(map[string]string)
batchSize := 49
for i := 0; i < len(hashs); i += batchSize {
end := i + batchSize