Skip to content

Commit 059a324

Browse files
authored
fix(bilibiliparse): 处理视频总结为空的情况 (#1302)
1 parent b066449 commit 059a324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugin/bilibiliparse/parse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ func getVideoSummary(cookiecfg *bz.CookieConfig, card bz.Card) (msg []message.Se
234234
}
235235
err = json.Unmarshal(data, &videoSummary)
236236
msg = make([]message.Segment, 0, 16)
237+
if videoSummary.Data.ModelResult.Summary == `` {
238+
msg = append(msg, message.Text(fmt.Sprintf("生成视频总结: %s(%d)", videoSummary.Message, videoSummary.Code)))
239+
return
240+
}
237241
msg = append(msg, message.Text("已为你生成视频总结\n\n"))
238242
msg = append(msg, message.Text(videoSummary.Data.ModelResult.Summary, "\n\n"))
239243
for _, v := range videoSummary.Data.ModelResult.Outline {

0 commit comments

Comments
 (0)