From: qydysky Date: Sat, 14 Nov 2020 21:59:51 +0000 (+0800) Subject: fix bug X-Git-Tag: v0.5.0^2~4 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=d5985f500e60e03caa19881297a228732cb5d423;p=bili_danmu%2F.git fix bug --- diff --git a/CV/Var.go b/CV/Var.go index fd79c86..e6aa187 100644 --- a/CV/Var.go +++ b/CV/Var.go @@ -6,6 +6,7 @@ var ( Roomid int Cookie string Title string + Rev int//营收 ) //from player-loader-2.0.11.min.js diff --git a/Reply/F.go b/Reply/F.go index 5e555af..f5f6893 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -23,6 +23,7 @@ import ( //功能开关 var AllF = map[string]bool{ + `ShowRec`:true,//显示本次营收 "Gtk":false,//Gtk弹幕窗口 "Saveflv":true,//保存直播流(默认高清,有cookie默认蓝光) "Ass":true,//Ass弹幕生成,由于时间对应关系,仅开启流保存时生效 @@ -115,6 +116,15 @@ func selfcross2(a []string) (float32, string) { } //功能区 +//ShowRec 显示h营收 +func ShowRecf(){ + if!IsOn("ShowRec") {return} + for { + p.Sys().Timeoutf(60) + p.Logf().New().Open("danmu.log").Base(1, "Rec").I("营收 ¥", c.Rec) + } +} + //Gtk 弹幕Gtk窗口 func Gtkf(){ if!IsOn("Gtk") {return} diff --git a/Reply/Reply.go b/Reply/Reply.go index 5f25e4d..6ac15bb 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -143,6 +143,7 @@ func (replyF) user_toast_msg(s string){ } if price != nil { sh = append(sh, "¥", int(price.(float64)) / 1000) + c.Rev += int(price.(float64)) / 1000 } {//额外 ass Assf(fmt.Sprintln(sh...)) @@ -190,6 +191,7 @@ func (replyF) special_gift(s string){ } if content != nil { sh = append(sh, "节奏风暴", content, "¥ 100") + c.Rev += 100 } {//额外 Assf(fmt.Sprintln(sh...)) @@ -309,6 +311,7 @@ func (replyF) send_gift(s string){ if total_coin != nil { allprice = int64(total_coin.(float64) / 1000) sh = append(sh, "¥", allprice) + c.Rev += int(allprice) } if len(sh) == 0 {return} @@ -413,6 +416,7 @@ func (replyF) super_chat_message(s string){ } if price != nil { sh = append(sh, "¥", price, "\n") + c.Rev += int(price.(float64)) } fmt.Println("====") fmt.Println(sh...)