From 9553961e3cd50f27dbaba51f19dc549deb5ccf74 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 9 Jan 2024 11:31:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9F=B3=E9=A2=91?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getPostBlocks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js index 809dfe7a..20c9acab 100644 --- a/lib/notion/getPostBlocks.js +++ b/lib/notion/getPostBlocks.js @@ -102,7 +102,10 @@ function filterPostBlocks(id, pageBlock, slice) { } // 如果是文件,或嵌入式PDF,需要重新加密签名 - if ((b?.value?.type === 'file' || b?.value?.type === 'pdf' || b?.value?.type === 'video') && b?.value?.properties?.source?.[0][0]) { + if ((b?.value?.type === 'file' || b?.value?.type === 'pdf' || b?.value?.type === 'video' || b?.value?.type === 'audio') && + b?.value?.properties?.source?.[0][0] && + b?.value?.properties?.source?.[0][0].indexOf('amazonaws.com') > 0 + ) { const oldUrl = b?.value?.properties?.source?.[0][0] const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}` b.value.properties.source[0][0] = newUrl From b56dc81749b0e3f3247dbe1a4db0649bd47da37f Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 9 Jan 2024 11:32:27 +0800 Subject: [PATCH 2/2] 4.1.4 --- .env.local | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.local b/.env.local index 7e529e5c..8a1867eb 100644 --- a/.env.local +++ b/.env.local @@ -1,5 +1,5 @@ # 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables -NEXT_PUBLIC_VERSION=4.1.3 +NEXT_PUBLIC_VERSION=4.1.4 # 可在此添加环境变量,去掉最左边的(# )注释即可 diff --git a/package.json b/package.json index cccc5a3e..a521b97f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "4.1.3", + "version": "4.1.4", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": {