修复视频无法播放

This commit is contained in:
tangly1024
2023-10-29 13:25:17 +08:00
parent a78b97a509
commit 0d0c1ac9ea

View File

@@ -102,7 +102,7 @@ function filterPostBlocks(id, pageBlock, slice) {
}
// 如果是文件或嵌入式PDF需要重新加密签名
if ((b?.value?.type === 'file' || b?.value?.type === 'pdf') && b?.value?.properties?.source?.[0][0]) {
if ((b?.value?.type === 'file' || b?.value?.type === 'pdf' || b?.value?.type === 'video') && b?.value?.properties?.source?.[0][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