From d5795aef083e764b9a1272ec29c4ef746dbebf63 Mon Sep 17 00:00:00 2001 From: binaryify Date: Fri, 31 May 2024 17:37:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=91=E7=9B=98=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ module/cloud.js | 3 +++ package.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index ebd69a7..1c5feda 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -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) diff --git a/module/cloud.js b/module/cloud.js index 03a9596..0dd7f7a 100644 --- a/module/cloud.js +++ b/module/cloud.js @@ -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, '') diff --git a/package.json b/package.json index 3e870b1..792e7b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.19.8", + "version": "4.19.9", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",