From d86f24107c6ea43de3711c7da079e4f68c142814 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Thu, 16 Oct 2025 16:02:43 +0800 Subject: [PATCH] =?UTF-8?q?Updata=EF=BC=9A=E6=9B=B4=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/api/video_scanner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/video_scanner.go b/internal/api/video_scanner.go index 766be1f..15bbf8e 100644 --- a/internal/api/video_scanner.go +++ b/internal/api/video_scanner.go @@ -96,7 +96,7 @@ func (s *VideoScanner) ScanVideoAsync(videoURL string, dataID string, serviceTyp } // GetVideoResult 获取视频审核结果 -func (s *VideoScanner) GetVideoResult(taskID string) (*model.VideoResultResponse, error) { +func (s *VideoScanner) GetVideoResult(taskID string, serviceType VideoServiceType) (*model.VideoResultResponse, error) { // 创建运行时配置 runtime := &util.RuntimeOptions{} runtime.ReadTimeout = tea.Int(10000) @@ -104,7 +104,7 @@ func (s *VideoScanner) GetVideoResult(taskID string) (*model.VideoResultResponse // 构建请求参数 videoResultRequest := &green20220302.VideoModerationResultRequest{ - Service: tea.String("videoDetection_global"), + Service: tea.String(string(serviceType)), ServiceParameters: tea.String(fmt.Sprintf(`{"taskId":"%s"}`, taskID)), } @@ -164,7 +164,7 @@ func (s *VideoScanner) ScanVideoAndWait(videoURL string, dataID string, serviceT // 轮询获取结果 startTime := time.Now() for time.Since(startTime) < maxWaitTime { - result, err := s.GetVideoResult(taskID) + result, err := s.GetVideoResult(taskID, serviceType) if err != nil { return nil, fmt.Errorf("获取结果失败: %v", err) }