From ea3d1065e8bbdfde379700bf74eb634e88915ab2 Mon Sep 17 00:00:00 2001 From: shinya Date: Mon, 14 Jul 2025 13:23:46 +0800 Subject: [PATCH] feat: lower d1 saveCurrentPlayProgress frequency --- src/app/play/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 4244a4d..fc2e858 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -1205,7 +1205,10 @@ function PlayPageClient() { artPlayerRef.current.on('video:timeupdate', () => { const now = Date.now(); - if (now - lastSaveTimeRef.current > 5000) { + if ( + now - lastSaveTimeRef.current > + (process.env.NEXT_PUBLIC_STORAGE_TYPE === 'd1' ? 10000 : 5000) + ) { saveCurrentPlayProgress(); lastSaveTimeRef.current = now; }