]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 刷新房间时,重新获取弹幕url
authorqydysky <qydysky@foxmail.com>
Sat, 1 Jul 2023 15:50:55 +0000 (23:50 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 1 Jul 2023 15:50:55 +0000 (23:50 +0800)
bili_danmu.go

index 63a34364e3b8342c118458b41ac7d83c624b2bd9..3b346eab8b80c8b06ff996aa772ece2cb0e622af 100644 (file)
@@ -163,17 +163,17 @@ func Start() {
                        })
 
                        F.Get(c.C).Get(`Liveing`)
-                       //检查与切换粉丝牌,只在cookie存在时启用
+                       // 检查与切换粉丝牌,只在cookie存在时启用
                        F.Get(c.C).Get(`CheckSwitch_FansMedal`)
 
-                       //直播状态
+                       // 直播状态
                        if c.C.Liveing {
                                danmulog.L(`I: `, "直播中")
                        } else {
                                danmulog.L(`I: `, "未直播")
                        }
 
-                       //对每个弹幕服务器尝试
+                       // 对每个弹幕服务器尝试
                        F.Get(c.C).Get(`WSURL`)
                        aliveT := time.Now().Add(3 * time.Hour)
                        for i, exitloop := 0, false; !exitloop && i < len(c.C.WSURL) && time.Now().Before(aliveT); {
@@ -313,6 +313,7 @@ func Start() {
                                                        return true
                                                },
                                                `flash_room`: func(_ any) bool { //重进房时退出当前房间
+                                                       F.Get(c.C).Get(`WSURL`)
                                                        ws_c.Close()
                                                        return true
                                                },