mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-21 17:24:41 +08:00
feat: lower d1 saveCurrentPlayProgress frequency
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user