From 36a90e695f6bd0267c4347b9d0be8bebea16aec7 Mon Sep 17 00:00:00 2001 From: Zhou Hua Date: Mon, 10 Mar 2025 16:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/main.ts b/src/main.ts index 6296faf..b6d7144 100644 --- a/src/main.ts +++ b/src/main.ts @@ -215,23 +215,7 @@ export default class WaveformPlayerPlugin extends Plugin { } getAudioFile(src: string): null | TFile { - // const decodedSrc = decodeURIComponent(src); - // let audioFile = this.app.vault.getAbstractFileByPath(decodedSrc); const audioFile = this.app.metadataCache.getFirstLinkpathDest(src, ''); - // if (!audioFile || !(audioFile instanceof TFile)) { - // const attachPath = this.app.vault.config.attachmentFolderPath; - // if (!attachPath) { - // return null; - // } - - // audioFile = this.app.vault.getAbstractFileByPath(`${attachPath}/${decodedSrc}`); - // if (!audioFile || !(audioFile instanceof TFile)) { - // audioFile = this.app.vault.getAbstractFileByPath(`${attachPath}/${src}`); - // if (!audioFile || !(audioFile instanceof TFile)) { - // return null; - // } - // } - // } return audioFile instanceof TFile ? audioFile : null; } @@ -245,7 +229,6 @@ export default class WaveformPlayerPlugin extends Plugin { audioElements.forEach((div) => { const src = div.getAttribute('src'); - console.log('src', src); if (!src || !/\.(?:mp3|wav|ogg|m4a|webm)$/i.test(src)) { return; }