fix: 为 BeatLeader 和 ScoreSaber 的歌曲哈希查询添加空输入处理

This commit is contained in:
lixiangwuxian 2025-03-08 21:06:34 +08:00
parent 48ed4e8569
commit 1505844fa3
2 changed files with 6 additions and 0 deletions

View File

@ -368,6 +368,9 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
}
func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error) {
if len(hashs) == 0 {
return nil, nil
}
//每批最多49个
hashToSongId = make(map[string]string)
batchSize := 49

View File

@ -396,6 +396,9 @@ func (ss *ssQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
}
func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error) {
if len(hashs) == 0 {
return nil, nil
}
//每批最多49个
hashToSongId = make(map[string]string)
batchSize := 49