]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix 添加随机数
authorqydysky <qydysky@foxmail.com>
Sun, 2 Jul 2023 07:44:53 +0000 (15:44 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 2 Jul 2023 07:44:53 +0000 (15:44 +0800)
Reply/stream.go

index 35bcd6e5f834781478187f2536111d1679cc03de..d6ae8aa3056eb33b6cd53094d447804a19c62476 100644 (file)
@@ -32,6 +32,7 @@ import (
        reqf "github.com/qydysky/part/reqf"
        signal "github.com/qydysky/part/signal"
        slice "github.com/qydysky/part/slice"
+       pstring "github.com/qydysky/part/strings"
 )
 
 type M4SStream struct {
@@ -556,12 +557,13 @@ func (t *M4SStream) getSavepath() {
        w := md5.New()
        _, _ = io.WriteString(w, t.common.Title)
 
-       t.Current_save_path = fmt.Sprintf("%s/%s-%d-%d-%x/",
+       t.Current_save_path = fmt.Sprintf("%s/%s-%d-%d-%x-%s/",
                t.config.save_path,
                time.Now().Format("2006_01_02-15_04_05"),
                t.common.Roomid,
                t.common.Live_qn,
-               w.Sum(nil)[:3])
+               w.Sum(nil)[:3],
+               pstring.Rand(2, 3))
 
        // 显示保存位置
        if rel, err := filepath.Rel(t.config.save_path, t.Current_save_path); err == nil {