mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 增加netease解析健壮性
This commit is contained in:
parent
fd271ec0ed
commit
4e6fe09e4f
@ -166,8 +166,8 @@ export class neteasepro extends plugin {
|
|||||||
} else {
|
} else {
|
||||||
// 非小程序
|
// 非小程序
|
||||||
const title = await getSongDetail(id).then(res => {
|
const title = await getSongDetail(id).then(res => {
|
||||||
const song = res.songs[0];
|
const song = res?.songs[0];
|
||||||
return `${song?.name}-${song?.ar?.[0].name}`.replace(/[\/\?<>\\:\*\|".… ]/g, "");
|
return song.length > 0 ? `${song?.name}-${song?.ar?.[0].name}`.replace(/[\/\?<>\\:\*\|".… ]/g, "") : "暂无信息";
|
||||||
});
|
});
|
||||||
e.reply(`识别:网易云音乐,${title}`);
|
e.reply(`识别:网易云音乐,${title}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user