Prevent autosave playback from resetting to 0 on page reload.
This fixes an issue where the player could send an early time: 0 progress update during initial load/reload, overwriting previously saved progress. The client-side now blocks progress saving until resume restoration completes and the player's currentTime reflects the restored position, while the backend defensively ignores time=0 updates with unknown duration if a non-zero progress already exists.
Prevent autosave playback from resetting to 0 on page reload.
This fixes an issue where the player could send an early `time: 0` progress update during initial load/reload, overwriting previously saved progress. The client-side now blocks progress saving until resume restoration completes and the player's `currentTime` reflects the restored position, while the backend defensively ignores `time=0` updates with unknown duration if a non-zero progress already exists.
---
<a href="https://cursor.com/background-agent?bcId=bc-861a0037-ab8b-411d-bf01-0c6083f89f65"><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-861a0037-ab8b-411d-bf01-0c6083f89f65"><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 autosave playback from resetting to 0 on page reload.
This fixes an issue where the player could send an early
time: 0progress update during initial load/reload, overwriting previously saved progress. The client-side now blocks progress saving until resume restoration completes and the player'scurrentTimereflects the restored position, while the backend defensively ignorestime=0updates with unknown duration if a non-zero progress already exists.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