From 1f8fa5138cba6f2849dccd28770b177c2720affd Mon Sep 17 00:00:00 2001 From: qydysky Date: Wed, 6 Jan 2021 23:02:29 +0800 Subject: [PATCH] =?utf8?q?=E6=95=88=E7=8E=87=E4=BC=98=E5=8C=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- Reply/Msg.go | 2 ++ Reply/Reply.go | 1 + demo/go.mod | 2 +- demo/go.sum | 2 ++ demo/main.go | 13 +++++-------- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 066297b..be7f91a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## bilibili 直播弹幕机 -golang go version go1.15.5 linux/amd64 +golang go version go1.15 linux/amd64 --- ### 目录释义 @@ -102,7 +102,7 @@ go build -v -tags `tts` -o demo.exe -i main.go ``` 编译命令 cd demo -go build -v -tags `gtk gtk_3_24` -o demo.exe -i main.go +go build -v -tags `gtk` -o demo.exe -i main.go ``` ### demo 前往[releases](https://github.com/qydysky/bili_danmu/releases)页下载对应系统版本。解压后进入`demo`目录(文件夹),运行`demo.run`(`demo.exe`)。 diff --git a/Reply/Msg.go b/Reply/Msg.go index 244a68e..c647d2e 100644 --- a/Reply/Msg.go +++ b/Reply/Msg.go @@ -14,6 +14,8 @@ var msglog = c.Log.Base(`Msg`) //Msg类型数据处理方法map var Msg_map = map[string]func(replyF, string) { + `HOT_RANK_SETTLEMENT`:nil, + `HOT_RANK_CHANGED`:nil, `CARD_MSG`:nil,//提示关注 `LIVE_INTERACTIVE_GAME`:nil, `WIDGET_BANNER`:nil,//每日任务 diff --git a/Reply/Reply.go b/Reply/Reply.go index 2a2e224..1fb69e1 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -609,6 +609,7 @@ func Msg_senddanmu(msg string){ //由于额外功能有些需要显示,为了统一管理,使用此方法进行处理 func Msg_showdanmu(auth interface{}, m ...string) { msg := m[0] + msglog := msglog.Log_show_control(false) {//附加功能 更少弹幕 if Lessdanmuf(msg, 20) > 0.7 {//与前20条弹幕重复的字数占比度>0.7的屏蔽 if auth != nil {msglog.L(`I: `, auth, ":", msg)} diff --git a/demo/go.mod b/demo/go.mod index fdbbc80..01265da 100644 --- a/demo/go.mod +++ b/demo/go.mod @@ -11,7 +11,7 @@ require ( github.com/miekg/dns v1.1.35 // indirect github.com/mitchellh/mapstructure v1.4.0 // indirect github.com/qydysky/bili_danmu v0.5.7 - github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b // indirect + github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b // indirect github.com/shirou/gopsutil v3.20.12+incompatible // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect diff --git a/demo/go.sum b/demo/go.sum index 8d811f3..ccbaccc 100644 --- a/demo/go.sum +++ b/demo/go.sum @@ -103,6 +103,8 @@ github.com/qydysky/part v0.3.5-0.20201228170623-c701da7df342 h1:7wCI40bHHgJ9+yBy github.com/qydysky/part v0.3.5-0.20201228170623-c701da7df342/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0= github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b h1:rKR4PD/8CzT28Whf4ILQ4WZZW1S8MxJFSluYtrzu5+c= github.com/qydysky/part v0.3.5-0.20210105160037-508c706d691b/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0= +github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b h1:6udRQFyusCP7uMlfcUcFhg2zX2/QABOg005ayEaekhA= +github.com/qydysky/part v0.3.5-0.20210106133414-a27e61b5ba4b/go.mod h1:SxxNav0Z7DbsDLoG5uxo0wW5EKU/JBu2CAkZzZeLnX0= github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad h1:Jtzf509lQrkUMGTV0Sc6IDCAiR1VrBcHrIban7hpye4= github.com/qydysky/part/msgq v0.0.0-20201213031129-ca3253dc72ad/go.mod h1:w32TkJNVtTJd4LOS09cq+4uYG6itcN2vsqw+slp44Rg= github.com/qydysky/part/msgq v0.0.0-20201213120821-f36e49c32bba h1:1ew9dRpc0Rux0WkWeT/4AE15ynYWmL2D7onJEJIFOB8= diff --git a/demo/main.go b/demo/main.go index cd0204a..2b25021 100644 --- a/demo/main.go +++ b/demo/main.go @@ -1,17 +1,14 @@ package main import ( - // "os" - // "runtime/pprof" + // "net/http" + // _ "net/http/pprof" q "github.com/qydysky/bili_danmu" ) func main() { - // f, _ := os.OpenFile("cpu.pprof", os.O_RDWR|os.O_CREATE, 0644) - // pprof.StartCPUProfile(f) - + // go func() { + // http.ListenAndServe("0.0.0.0:8899", nil) + // }() q.Demo() - - // pprof.StopCPUProfile() - // f.Close() } \ No newline at end of file -- 2.39.2