]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 兼容旧录播格式
authorqydysky <qydysky@foxmail.com>
Wed, 28 Jun 2023 06:41:23 +0000 (14:41 +0800)
committerqydysky <qydysky@foxmail.com>
Wed, 28 Jun 2023 06:41:23 +0000 (14:41 +0800)
Reply/F.go

index d49c06df067003dcc2e013b73392cd9a710f6d16..f62866abd994fc6ece9ef24a163b2667468a0b0c 100644 (file)
@@ -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)
                                                }
                                        }