]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix 修改标题刷新录制标题
authorqydysky <qydysky@foxmail.com>
Sat, 8 Apr 2023 17:16:53 +0000 (01:16 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 8 Apr 2023 17:16:53 +0000 (01:16 +0800)
Reply/F.go
Reply/Reply.go

index d066ffb9964e794b198b71fff473418ff465c9de..3b05b7f021cfb9f51a47cf5899f83d5dcb1932ff 100644 (file)
@@ -359,9 +359,12 @@ func StreamOStop(roomid int) {
 }
 
 // 实例切断
-func StreamOCut(roomid int) {
+func StreamOCut(roomid int, title ...string) {
        if v, ok := streamO.Load(roomid); ok {
                if v.(*M4SStream).Status.Islive() {
+                       if len(title) != 0 {
+                               v.(*M4SStream).common.Title = title[0]
+                       }
                        v.(*M4SStream).msg.PushLock_tag(`cut`, v.(*M4SStream))
                        flog.L(`I: `, `已切片 `+strconv.Itoa(roomid))
                }
index fe013ed76e19b42489ec5bb4ae7645586c80abcf..61c7111aefbac4b62672624add5589f2b4799fdd 100644 (file)
@@ -503,7 +503,7 @@ func (replyF) room_change(s string) {
        var sh = []interface{}{"房间改变"}
 
        if c.C.Title != title.(string) {
-               StreamOCut(c.C.Roomid)
+               StreamOCut(c.C.Roomid, title.(string))
        }
 
        if title != nil {