优化弹幕识别逻辑

优化弹幕识别逻辑
This commit is contained in:
truewhile
2026-08-25 00:26:32 +08:00
parent 3bd441c288
commit 96a554b4b5
12 changed files with 1103 additions and 51 deletions
+7
View File
@@ -205,6 +205,13 @@ func TestDanmakuFetchHandlesSearch404(t *testing.T) {
srv := httptest.NewServer(mux)
defer srv.Close()
// 配置源 404 会回退官方,官方同样 404 才能稳定复现错误。
official := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
}))
defer official.Close()
overrideDanmakuOfficialBase(t, official.URL)
svc := newDanmakuTestService(t)
ctx := context.Background()
require.NoError(t, svc.repo.Setting.Set(ctx, DanmakuSourceKey, srv.URL))