From: qydysky Date: Sat, 20 Jul 2024 15:33:22 +0000 (+0800) Subject: Improve 更新说明 X-Git-Tag: v0.14.10~9 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=41e5a51c980ea555e1d822c86d08a340824c3512;p=bili_danmu%2F.git Improve 更新说明 --- diff --git a/README.md b/README.md index af88998..5d57f90 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,11 @@ ### 说明 本项目使用github action自动构建,构建过程详见[yml](https://github.com/qydysky/bili_danmu/blob/master/.github/workflows/go.yml) +#### 直播回放显示表情 +配置文件中添加配置项`弹幕表情`(>v0.14.9)。默认为true,当为true时,将会保存弹幕中的表情png到emots目录下,并在回放时显示表情。 + +注意:需要配套更新`demo/html/artPlayer`下的资源 + #### 直播流停用服务器 配置文件中添加配置项`直播流停用服务器`(>v0.14.3)。默认为空,编写正则字符串,当获取到的服务器链接与字符串匹配时,将会停用。 diff --git a/Reply/F/danmuEmotes/danmuEmotes.go b/Reply/F/danmuEmotes/danmuEmotes.go index 9f4cbcd..afc3d44 100644 --- a/Reply/F/danmuEmotes/danmuEmotes.go +++ b/Reply/F/danmuEmotes/danmuEmotes.go @@ -23,6 +23,10 @@ type Danmu struct { Msg *string } +func init() { + _, _ = file.New("emots/README.md", 0, true).Write([]byte(""), false) +} + func saveEmote(ctx context.Context, ptr Danmu) (ret any, err error) { if m, ok := ptr.Info[13].(map[string]any); ok { if url, ok := m[`url`].(string); ok { diff --git a/demo/emots/README.md b/demo/emots/README.md new file mode 100644 index 0000000..e69de29 diff --git "a/demo/emots/[\346\257\224\345\277\203].png" "b/demo/emots/[\346\257\224\345\277\203].png" deleted file mode 100644 index 0001f64..0000000 Binary files "a/demo/emots/[\346\257\224\345\277\203].png" and /dev/null differ