feat: 添加音质选择 优化灰色歌曲解析

This commit is contained in:
alger
2025-01-06 20:54:42 +08:00
parent fcc47dc0ff
commit 020aca7384
12 changed files with 78 additions and 54 deletions
+2 -1
View File
@@ -81,6 +81,7 @@ import type { SongResult } from '@/type/music';
import { getImgUrl, isElectron } from '@/utils';
import { getImageBackground } from '@/utils/linearColor';
import { getSongUrl } from '@/hooks/MusicListHook';
import { cloneDeep } from 'lodash';
const props = withDefaults(
defineProps<{
@@ -148,7 +149,7 @@ const downloadMusic = async () => {
isDownloading.value = true;
const loadingMessage = message.loading('正在下载中...', { duration: 0 });
const url = await getSongUrl(props.item.id);
const url = await getSongUrl(props.item.id, cloneDeep(props.item));
if (!url) {
loadingMessage.destroy();
message.error('获取音乐下载地址失败');