From 0ab29403476718b52a1e4ecc56be12bd70141474 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 11 Aug 2023 14:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AC=E5=9C=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=A7=A3=E6=9E=90=E5=BC=82=E5=B8=B8=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/music.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/utils/music.ts b/src/renderer/utils/music.ts index 7846952f..5507c4a4 100644 --- a/src/renderer/utils/music.ts +++ b/src/renderer/utils/music.ts @@ -104,7 +104,10 @@ const getFileMetadata = async(path: string) => { if (prevFileInfo.path == path) return prevFileInfo.promise prevFileInfo.path = path return prevFileInfo.promise = checkPath(path).then(async(isExist) => { - return isExist ? import('music-metadata').then(async({ parseFile }) => parseFile(path)) : null + return isExist ? import('music-metadata').then(async({ parseFile }) => parseFile(path)).catch(err => { + console.log(err) + return null + }) : null }) } /**