feat: implement audio duration retrieval without ffmpeg dependencies

This commit is contained in:
CaIon
2025-10-28 15:50:45 +08:00
parent a25c11df2a
commit a00c6393c5
10 changed files with 430 additions and 139 deletions
+4 -4
View File
@@ -163,7 +163,7 @@ func parseFormData(data []byte, v any) error {
return err
}
return json.Unmarshal(jsonData, v)
return Unmarshal(jsonData, v)
}
func parseMultipartFormData(c *gin.Context, data []byte, v any) error {
@@ -174,7 +174,7 @@ func parseMultipartFormData(c *gin.Context, data []byte, v any) error {
}
if boundary == "" {
return json.Unmarshal(data, v) // Fallback to JSON
return Unmarshal(data, v) // Fallback to JSON
}
reader := multipart.NewReader(bytes.NewReader(data), boundary)
@@ -191,10 +191,10 @@ func parseMultipartFormData(c *gin.Context, data []byte, v any) error {
formMap[key] = vals
}
}
jsonData, err := json.Marshal(formMap)
jsonData, err := Marshal(formMap)
if err != nil {
return err
}
return json.Unmarshal(jsonData, v)
return Unmarshal(jsonData, v)
}