Auto save duration bug #51

Merged
quoije merged 1 commits from cursor/auto-save-duration-bug-e91c into 2026-video.backend 2025-12-22 04:54:03 -05:00
quoije commented 2025-12-22 04:53:12 -05:00 (Migrated from github.com)

Prevent duration from being overwritten to null during autosave and add no-store headers to progress API.

The player client sends duration: null when video metadata isn't yet available. The backend was incorrectly storing this null value, overwriting any previously known valid duration. This led to duration: null being persisted in the database, causing issues with duration-dependent features (e.g., progress clamping, "watched" status, end-of-video reset) and making autosave appear unreliable.


Open in Cursor Open in Web

Prevent `duration` from being overwritten to `null` during autosave and add `no-store` headers to progress API. The player client sends `duration: null` when video metadata isn't yet available. The backend was incorrectly storing this `null` value, overwriting any previously known valid duration. This led to `duration: null` being persisted in the database, causing issues with duration-dependent features (e.g., progress clamping, "watched" status, end-of-video reset) and making autosave appear unreliable. --- <a href="https://cursor.com/background-agent?bcId=bc-faa08aac-9dcb-4ea4-a8d5-5941a581835a"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-faa08aac-9dcb-4ea4-a8d5-5941a581835a"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
cursor[bot] commented 2025-12-22 04:53:13 -05:00 (Migrated from github.com)

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Cursor Agent can help with this pull request. Just `@cursor` in comments and I'll start working on changes in this branch. <sub>[Learn more](https://cursor.com/docs/background-agent/web-and-mobile) about Cursor Agents</sub>
Sign in to join this conversation.