From 48ed4e8569d2a8c3987a79831d13c367f1fa25c2 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 8 Mar 2025 21:02:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=20ScoreSaber=20?= =?UTF-8?q?=E6=AD=8C=E6=9B=B2=E5=93=88=E5=B8=8C=E6=9F=A5=E8=AF=A2=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/scoresaber/bind_ss.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/scoresaber/bind_ss.go b/service/scoresaber/bind_ss.go index 8b957a7..fb69f6b 100644 --- a/service/scoresaber/bind_ss.go +++ b/service/scoresaber/bind_ss.go @@ -411,6 +411,9 @@ func GetSongIdsByHash(hashs []string) (hashToSongId map[string]string, err error return nil, err } defer resp.Body.Close() + if resp.StatusCode != 200 { + return nil, fmt.Errorf("获取歌曲ID失败,状态码:%d,url:%s", resp.StatusCode, queryUrl) + } body, err := io.ReadAll(resp.Body) if err != nil { return nil, err