fix: 云盘上传中文乱码问题修复
All checks were successful
Node.js CI / Test (14.x) (push) Successful in 10m45s
Node.js CI / Test (16.x) (push) Successful in 10m46s
Node.js CI / Test (18.x) (push) Successful in 10m48s
Node.js CI / Lint (14.x) (push) Successful in 10m55s

This commit is contained in:
binaryify 2024-05-31 17:37:08 +08:00
parent 5f7c752707
commit d5795aef08
3 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,7 @@
# 更新日志
### 4.19.9 | 2024.05.31
- 云盘上传中文乱码问题修复 [#9](https://gitlab.com/Binaryify/neteasecloudmusicapi/-/issues/9)
### 4.19.8 | 2024.05.19
- 云盘上传问题修复 [#7](https://gitlab.com/Binaryify/neteasecloudmusicapi/-/merge_requests/7)

View File

@ -6,6 +6,9 @@ module.exports = async (query, request) => {
if (query.songFile.name.indexOf('flac') > -1) {
ext = 'flac'
}
query.songFile.name = Buffer.from(query.songFile.name, 'latin1').toString(
'utf-8',
)
const filename = query.songFile.name
.replace('.' + ext, '')
.replace(/\s/g, '')

View File

@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "4.19.8",
"version": "4.19.9",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",