]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Add 修改标题时重新录制
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 29 Jan 2023 12:28:14 +0000 (20:28 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 29 Jan 2023 12:28:14 +0000 (20:28 +0800)
Reply/Reply.go
demo/config/config_K_v.json

index 822c66148309d4fcae32feeec5ebc5f5033acc0f..7b49ad8035387cc1d340724d29c7860adb2ab26d 100644 (file)
@@ -477,6 +477,14 @@ func (replyF) room_change(s string) {
        Gui_show(Itos(sh), "0room")
 
        msglog.Base_add("房").L(`I: `, sh...)
+
+       //录制
+       go func() {
+               if v, ok := c.C.K_v.LoadV(`修改标题时重新录制`).(bool); ok && v {
+                       StreamOStop(c.C.Roomid) //停止其他房间录制
+               }
+               StreamOStart(c.C.Roomid)
+       }()
 }
 
 // Msg-超管警告
@@ -523,18 +531,18 @@ func (replyF) little_tips(s string) {
 }
 
 // Msg-人气排名
-func (replyF) popular_rank_changed(s string) {
-       var type_item ws_msg.POPULAR_RANK_CHANGED
+// func (replyF) popular_rank_changed(s string) {
+//     var type_item ws_msg.POPULAR_RANK_CHANGED
 
-       if e := json.Unmarshal([]byte(s), &type_item); e != nil {
-               msglog.L(`E: `, e)
-       }
-       s = fmt.Sprintf("人气排行 %d", type_item.Data.Rank)
+//     if e := json.Unmarshal([]byte(s), &type_item); e != nil {
+//             msglog.L(`E: `, e)
+//     }
+//     s = fmt.Sprintf("人气排行 %d", type_item.Data.Rank)
 
-       Gui_show(s, "0room")
+//     Gui_show(s, "0room")
 
-       msglog.Base_add("房").L(`I: `, s)
-}
+//     msglog.Base_add("房").L(`I: `, s)
+// }
 
 // Msg-开始了视频连线
 func (replyF) video_connection_join_start(s string) {
index 21b20df64300819d602a70b5ca8a0d29ba8ebfc2..50eda5766c8dc1520e5b13bf38248035a597622e 100644 (file)
@@ -62,6 +62,7 @@
     "直播hls流保存为MP4": true,
     "仅保存当前直播间流-help": "启用此项,才会保存Ass",
     "仅保存当前直播间流": true,
+    "修改标题时重新录制": true,
     "直播Web服务口":0,
     "直播Web缓冲长度-help":"非负整数,越长直播流延迟越高 内存占用越高",
     "直播Web缓冲长度":5,