From: qydysky Date: Wed, 28 Jun 2023 06:41:23 +0000 (+0800) Subject: Improve 兼容旧录播格式 X-Git-Tag: v0.10.0~9 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=6e14a7732ce3233bffb111c4743878f63c74b738;p=bili_danmu%2F.git Improve 兼容旧录播格式 --- diff --git a/Reply/F.go b/Reply/F.go index d49c06d..f62866a 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -1305,7 +1305,9 @@ func init() { c.ResStruct{Code: -1, Message: e.Error(), Data: nil}.Write(w) return } else { - filePath.StartT = strings.ReplaceAll(filePath.StartT, "_", ":") + if t, e := time.Parse("2006_01_02-15_04_05", filePath.StartT); e == nil { + filePath.StartT = t.Format(time.DateTime) + } filePaths = append(filePaths, filePath) } }