feat: 更新网易云音乐API版本并增强日志记录
更新NeteaseCloudMusicApi至最新版本4.28.0以获取最新功能 在wycloud音乐平台服务中添加详细日志记录,包括上传状态、错误信息和响应数据 添加.claude本地配置文件设置基础权限
This commit is contained in:
@@ -17,14 +17,25 @@ async function uploadSong(uid, filePath) {
|
||||
},
|
||||
});
|
||||
if (response === false) {
|
||||
logger.error(`[Upload] safeRequest failed, uid: ${uid}, file: ${path.basename(filePath)}`);
|
||||
return false;
|
||||
}
|
||||
logger.debug('uploadSong\'s resonse: ', response)
|
||||
logger.info(`[Upload] Response received for ${path.basename(filePath)}:`, {
|
||||
hasPrivateCloud: !!response.privateCloud,
|
||||
code: response.code,
|
||||
message: response.message || response.msg,
|
||||
keys: Object.keys(response),
|
||||
});
|
||||
|
||||
if (!response.privateCloud) {
|
||||
logger.error(`[Upload] No privateCloud field in response, uid: ${uid}, file: ${path.basename(filePath)}`, {
|
||||
fullResponse: JSON.stringify(response, null, 2)
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const songInfo = response.privateCloud.simpleSong;
|
||||
|
||||
|
||||
logger.info(`[Upload] Success, songId: ${songInfo.id}, matched: ${songInfo.ar[0].id !== 0 && songInfo.al.id !== 0}`);
|
||||
return {
|
||||
songId: songInfo.id,
|
||||
matched: songInfo.ar[0].id !== 0 && songInfo.al.id !== 0, // It's matched the song on wyMusic if singer and album has info
|
||||
|
||||
Reference in New Issue
Block a user