]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 弹幕分值默认统计弹幕数 (#163)
authorqydysky <qydysky@foxmail.com>
Fri, 7 Feb 2025 11:38:48 +0000 (19:38 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2025 11:38:48 +0000 (19:38 +0800)
Reply/stream.go

index 5c75d92230cb0cf55857785cf6f7e5318de213c3..e5bbe290406d97276f0ce5e4edd612a73b62046b 100644 (file)
@@ -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 {