feat(cloud): 添加音频元数据解析功能

- 集成 jsmediatags 库用于解析音频文件的 ID3 标签
- 实现 parseMediaTags 函数提取歌曲标题、艺术家和专辑信息
- 在上传前添加音频元数据解析步骤
- 将解析的元数据传递给 completeUpload 函数
- 使用元数据中的标题作为歌曲名称,提高准确性
- 添加默认值处理以防止解析失败
- 更新 completeUpload 函数接收文件对象和媒体标签参数
- 移除模块中不再使用的文件扩展名提取逻辑
This commit is contained in:
LaoShui
2026-02-18 18:49:05 +08:00
parent 83c527af01
commit 872bae1b43
2 changed files with 31 additions and 8 deletions
-1
View File
@@ -23,7 +23,6 @@ module.exports = async (query, request) => {
}
const songName = song || filename.replace(/\.[^.]+$/, '')
const ext = filename.includes('.') ? filename.split('.').pop() : 'mp3'
const res2 = await request(
`/api/upload/cloud/info/v2`,