处理路径中存在百分号导致的问题

This commit is contained in:
lyswhut
2022-11-04 20:27:51 +08:00
parent 209bf9e0aa
commit 11d3754c08
12 changed files with 35 additions and 29 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { encodePath } from '@common/utils/common'
import { updateListMusics } from '@renderer/store/list/action'
import { saveLyric, saveMusicUrl } from '@renderer/utils/ipc'
import { getLocalFilePath } from '@renderer/utils/music'
@@ -19,7 +20,7 @@ export const getMusicUrl = async({ musicInfo, isRefresh, onToggleSource = () =>
}): Promise<string> => {
if (!isRefresh) {
const path = await getLocalFilePath(musicInfo)
if (path) return path
if (path) return encodePath(path)
}
onToggleSource()
const otherSource = await getOtherSource(musicInfo)