From 4403301f72d1c13f10babe863b52795b0c2ae95f Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sun, 24 May 2026 02:34:05 +0200 Subject: [PATCH] fix: allow progress requests --- static/player/progress.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/static/player/progress.ts b/static/player/progress.ts index f111a6f..3e19c87 100644 --- a/static/player/progress.ts +++ b/static/player/progress.ts @@ -16,8 +16,6 @@ const sendBeacon = (payload: string) => { return true; }; -const hasSessionCookie = (): boolean => document.cookie.includes('session_id='); - let saveProgressInFlight: Promise | null = null; /** @@ -29,8 +27,6 @@ export const saveProgress = async (): Promise => { const request = (async (): Promise => { if (state.transitionEpisode !== null || !state.malID || state.video.currentTime < 1) return; - // progress is user-scoped; avoid spamming 401s for anonymous sessions - if (!hasSessionCookie()) return; const episode = Number.parseInt(state.currentEpisode, 10); if (!episode) return; @@ -80,8 +76,6 @@ const scheduleProgressSave = (): void => { */ export const markEpisodeTransition = (episodeNumber: number): void => { if (!state.malID || !episodeNumber) return; - // progress is user-scoped; avoid sending beacons for anonymous sessions - if (!hasSessionCookie()) return; if (state.progressSaveTimer !== undefined) { window.clearTimeout(state.progressSaveTimer); state.progressSaveTimer = undefined; @@ -124,7 +118,6 @@ export const setupProgress = (): void => { // save on page close window.addEventListener('beforeunload', () => { if (state.transitionEpisode !== null || state.completionSent || !state.malID) return; - if (!hasSessionCookie()) return; const episode = Number.parseInt(state.currentEpisode, 10); if (!episode) return; sendBeacon(buildPayload(episode, displayTimeFromAbsolute(state.video.currentTime)));