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;
})
+3 -3
View File
@@ -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);
}
}
+1 -1
View File
@@ -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>