From: qydysky Date: Fri, 7 Feb 2025 11:38:48 +0000 (+0800) Subject: Improve 弹幕分值默认统计弹幕数 (#163) X-Git-Tag: v0.15.7~3 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=73e6a33471112de7988331a3a874fe5715830f8b;p=bili_danmu%2F.git Improve 弹幕分值默认统计弹幕数 (#163) --- diff --git a/Reply/stream.go b/Reply/stream.go index 5c75d92..e5bbe29 100644 --- a/Reply/stream.go +++ b/Reply/stream.go @@ -1406,7 +1406,13 @@ func (t *M4SStream) Start() bool { startf := func(_ *M4SStream) error { l.L(`T: `, `开始`) //弹幕分值统计 - replyFunc.DanmuCountPerMin.Rec(contextC, ms.common.Roomid, ms.GetSavePath())(ms.common.K_v.LoadV("弹幕分值").(map[string]any)) + { + var m map[string]any + if tmp, ok := ms.common.K_v.LoadV("弹幕分值").(map[string]any); ok { + m = tmp + } + replyFunc.DanmuCountPerMin.Rec(contextC, ms.common.Roomid, ms.GetSavePath())(m) + } return nil } stopf := func(_ *M4SStream) error {