Skip to content

Commit ccda9fe

Browse files
authored
Merge pull request #746 from imsyy/dev-fixplayer
fix:特殊文件名播放问题
2 parents 5113af1 + 46d646d commit ccda9fe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/core/player/SongManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ class SongManager {
290290
console.error("❌ 本地文件不存在");
291291
return { id: song.id, url: undefined };
292292
}
293-
return { id: song.id, url: `file://${song.path}` };
293+
const encodedPath = song.path.replace(/#/g, "%23").replace(/\?/g, "%3F");
294+
return { id: song.id, url: `file://${encodedPath}` };
294295
}
295296

296297
// 在线歌曲

0 commit comments

Comments
 (0)