feat: 优化音源解析

This commit is contained in:
alger
2026-02-10 09:06:25 +08:00
parent 16b2a1cece
commit bb2dbc3f00
21 changed files with 351 additions and 244 deletions
+2 -3
View File
@@ -257,10 +257,9 @@ const getFavoriteSongs = async () => {
try {
const currentIds = getCurrentPageIds();
// 分离网易云音乐ID和B站视频ID
const musicIds = currentIds.filter((id) => typeof id === 'number') as number[];
// 处理网易云音乐数据
// 处理音乐数据
let neteaseSongs: SongResult[] = [];
if (musicIds.length > 0) {
const res = await getMusicDetail(musicIds);
@@ -282,7 +281,7 @@ const getFavoriteSongs = async () => {
.map((id) => {
const strId = String(id);
// 查找网易云音乐
// 查找音乐
const found = neteaseSongs.find((song) => String(song.id) === strId);
return found;
})