Skip to content

Commit

Permalink
🐞 fix: 修复下载路径分隔符 #302
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Dec 2, 2024
1 parent 94c0ca7 commit 71a2821
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@pixi/filter-color-matrix": "^7.4.2",
"@pixi/sprite": "^7.4.2",
"@vueuse/core": "^10.11.1",
"NeteaseCloudMusicApi": "^4.24.0",
"NeteaseCloudMusicApi": "^4.25.0",
"axios": "^1.7.7",
"change-case": "^5.4.4",
"dayjs": "^1.11.13",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/components/Modal/DownloadSong.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</n-flex>
</n-radio-group>
</n-collapse-item>
<n-collapse-item v-if="isElectron" title="下载路径" name="path">
<n-collapse-item v-if="isElectron" title="本次下载路径" name="path">
<n-input-group>
<n-input :value="downloadPath || '未配置下载目录'" disabled>
<template #prefix>
Expand Down Expand Up @@ -137,7 +137,7 @@ const changeDownloadPath = async () => {
const download = async () => {
if (!songData.value) return;
loading.value = true;
downloadPath.value = settingStore.downloadPath;
if (settingStore.downloadPath) downloadPath.value = settingStore.downloadPath;
try {
// 获取下载链接
const result = await songDownloadUrl(props.id, songLevelChoosed.value);
Expand Down Expand Up @@ -184,7 +184,7 @@ const electronDownload = async (url: string, songName: string, fileType: string)
}
// 下载歌曲
const config = {
fileName: songName,
fileName: songName.replace(/[/:*?"<>|]/g, "&"),
fileType,
path: downloadPath.value,
downloadMeta,
Expand Down

0 comments on commit 71a2821

Please sign in to comment.