From 88e57a7e699f5be1a3f1a26571187f9b48e1cfdf Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 2 Jul 2023 15:44:53 +0800 Subject: [PATCH] =?utf8?q?Fix=20=E6=B7=BB=E5=8A=A0=E9=9A=8F=E6=9C=BA?= =?utf8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/stream.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Reply/stream.go b/Reply/stream.go index 35bcd6e..d6ae8aa 100644 --- a/Reply/stream.go +++ b/Reply/stream.go @@ -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 { -- 2.39.2