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.
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> <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 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Prevent
durationfrom being overwritten tonullduring autosave and addno-storeheaders to progress API.The player client sends
duration: nullwhen video metadata isn't yet available. The backend was incorrectly storing thisnullvalue, overwriting any previously known valid duration. This led toduration: nullbeing 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.Cursor Agent can help with this pull request. Just
@cursorin comments and I'll start working on changes in this branch.Learn more about Cursor Agents