🎈 pref: V1.6.7-lts 提升netease健壮性 & netease国内使用更换

1. 提升netease健壮性
2. netease国内使用更换为全走临时接口
This commit is contained in:
zhiyu 2024-05-02 14:17:11 +08:00
parent fc3de8024d
commit 00e0baf7a6

View File

@ -1033,7 +1033,7 @@ export class tools extends plugin {
}, },
}).then(async resp => { }).then(async resp => {
// 国内解决方案替换API后这里也需要修改 // 国内解决方案替换API后这里也需要修改
let url = isOversea ? await resp.data.data?.[0].url : await resp.data.data.url; let url = await resp.data.data?.[0]?.url || null;
// 获取歌曲信息 // 获取歌曲信息
let title = await axios.get(AUTO_NETEASE_SONG_DETAIL.replace("{}", id)).then(res => { let title = await axios.get(AUTO_NETEASE_SONG_DETAIL.replace("{}", id)).then(res => {
const song = res.data.songs[0]; const song = res.data.songs[0];
@ -1057,8 +1057,8 @@ export class tools extends plugin {
} }
// 下载音乐 // 下载音乐
downloadMp3(url, this.getCurDownloadPath(e), title, 'follow').then(async path => { downloadMp3(url, this.getCurDownloadPath(e), title, 'follow').then(async path => {
// 发送语音(待测试) // 发送语音
// e.reply(segment.record(fs.readFileSync(path))); // e.reply(segment.record(path));
// 判断是不是icqq // 判断是不是icqq
if (e.bot?.sendUni) { if (e.bot?.sendUni) {
e.group.fs.upload(path); e.group.fs.upload(path);