@@ -1141,20 +1207,20 @@ const FileList: React.FC = () => {
{danmakuStats && (
-
+
💬
弹幕 {danmakuStats.danmaku}
-
+
🎁
礼物 {danmakuStats.gift}
-
+
💰
SC {danmakuStats.sc}
{danmakuStats.scAmount > 0 && ¥{danmakuStats.scAmount}}
-
+
⚓
上舰 {danmakuStats.guard}
From 850bf2ad2c12b0dd2491bb1cadfde5580a51f6b0 Mon Sep 17 00:00:00 2001
From: Joftal <42807405+Joftal@users.noreply.github.com>
Date: Mon, 1 Jun 2026 11:25:11 +0800
Subject: [PATCH 20/21] =?UTF-8?q?fix=EF=BC=9A=E9=87=8D=E8=BF=9E=E7=99=BB?=
=?UTF-8?q?=E5=BD=95=E5=A4=B1=E8=B4=A5=E5=90=8E=20readLoop=20=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=20nil=20=E5=AF=BC=E8=87=B4=E5=BD=95=E5=88=B6=E6=84=8F?=
=?UTF-8?q?=E5=A4=96=E9=80=80=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
readLoop 在 c.conn=nil 时返回 nil,调用方无法区分"正常停止"
和"连接不可用"。重连登录失败后 c.conn 被置 nil,readLoop
返回 nil 触发外层 return,整个重连循环退出,录制无声停止。
改为返回 error,确保重连循环继续。
Co-Authored-By: Claude Opus 4.7
---
src/recorders/danmaku/douyu/client.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/recorders/danmaku/douyu/client.go b/src/recorders/danmaku/douyu/client.go
index f686220..6eb46fc 100644
--- a/src/recorders/danmaku/douyu/client.go
+++ b/src/recorders/danmaku/douyu/client.go
@@ -328,7 +328,7 @@ func (c *DouyuClient) readLoop(ctx context.Context) error {
conn := c.getConn()
if conn == nil {
- return nil
+ return fmt.Errorf("连接不可用")
}
conn.SetReadDeadline(time.Now().Add(readTimeout))
frameType, body, err := c.readFrame(conn)
From aa0928444334ffc5b7853e2d77ae216f0dc0c7e4 Mon Sep 17 00:00:00 2001
From: Joftal <42807405+Joftal@users.noreply.github.com>
Date: Mon, 1 Jun 2026 11:55:32 +0800
Subject: [PATCH 21/21] =?UTF-8?q?fix=EF=BC=9AWrappedLive=20=E9=80=8F?=
=?UTF-8?q?=E4=BC=A0=E6=96=97=E9=B1=BC=E5=B7=B2=E8=A7=A3=E6=9E=90=E7=9A=84?=
=?UTF-8?q?=E6=95=B0=E5=AD=97=E6=88=BF=E9=97=B4=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
WrappedLive 嵌入 Live 接口,类型断言 l.(roomIDProvider) 不会
穿透到下层具体类型的 GetRoomID() 方法,导致 extractDouyuRoomID
始终回退到 URL path,别名 URL 的弹幕录制仍然失败。
在 WrappedLive 上添加 GetRoomID() 方法,委托给底层 Live 实现。
Co-Authored-By: Claude Opus 4.7
---
src/live/lives.go | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/live/lives.go b/src/live/lives.go
index 9454236..b3d640f 100755
--- a/src/live/lives.go
+++ b/src/live/lives.go
@@ -290,6 +290,18 @@ func (w *WrappedLive) Close() {
}
}
+// GetRoomID 返回底层 Live 已解析的数字房间号(如有)。
+// 用于斗鱼等平台别名 URL 的弹幕录制。
+func (w *WrappedLive) GetRoomID() string {
+ type roomIDProvider interface {
+ GetRoomID() string
+ }
+ if provider, ok := w.Live.(roomIDProvider); ok {
+ return provider.GetRoomID()
+ }
+ return ""
+}
+
func (w *WrappedLive) GetInfo() (*Info, error) {
// 在通用位置应用平台访问频率限制
// 如果被取消则直接返回