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;
|
||||
})
|
||||
|
||||
@@ -555,7 +555,7 @@ const loadHistoryData = async () => {
|
||||
|
||||
// 根据分类处理不同的数据
|
||||
if (currentCategory.value === 'songs') {
|
||||
// 区分本地歌曲和网易云歌曲
|
||||
// 区分本地歌曲和云歌曲
|
||||
const localItems: any[] = [];
|
||||
const neteaseItems: any[] = [];
|
||||
|
||||
@@ -567,7 +567,7 @@ const loadHistoryData = async () => {
|
||||
}
|
||||
});
|
||||
|
||||
// 获取网易云歌曲详情
|
||||
// 获取歌曲详情
|
||||
let neteaseSongs: SongResult[] = [];
|
||||
if (neteaseItems.length > 0) {
|
||||
try {
|
||||
@@ -585,7 +585,7 @@ const loadHistoryData = async () => {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取网易云歌曲详情失败:', error);
|
||||
console.error('获取歌曲详情失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
{{ item.name }}
|
||||
</h3>
|
||||
<p class="text-xs text-neutral-500 dark:text-neutral-400 line-clamp-1">
|
||||
{{ item.updateFrequency || '网易云音乐榜单' }}
|
||||
{{ item.updateFrequency }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user