mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 10:27:30 +08:00
feat: 优化音源解析
This commit is contained in:
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user