From 27e82baed077c155f8977d4774b19a9816aa995e Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 20 Dec 2023 10:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AC=E5=9C=B0=E6=AD=8C?= =?UTF-8?q?=E6=9B=B2=E7=9A=84=E5=9B=BE=E7=89=87=E6=97=A0=E6=B3=95=E5=9C=A8?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A0=8F=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=88#392=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/music/local.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/music/local.ts b/src/core/music/local.ts index 7c3d294..eaa4939 100644 --- a/src/core/music/local.ts +++ b/src/core/music/local.ts @@ -91,8 +91,11 @@ export const getPicUrl = async({ musicInfo, listId, isRefresh, onToggleSource = onToggleSource?: (musicInfo?: LX.Music.MusicInfoOnline) => void }): Promise => { if (!isRefresh) { - const pic = await readPic(musicInfo.meta.filePath) - if (pic) return pic + let pic = await readPic(musicInfo.meta.filePath) + if (pic) { + if (pic.startsWith('/')) pic = `file://${pic}` + return pic + } if (musicInfo.meta.picUrl) return musicInfo.meta.picUrl }