Skip to content

Saved playback position resets to 0 after a restart and an episode switch #353

Closed

Description

@chhoumann

Problem. After a restart, switching to another episode before the player has mounted overwrites the restored episode's saved position with 0. currentEpisode.set reads the unmounted player's zeroed currentTime and duration (src/store/index.ts:55-63). A jsdom probe turned a saved record of 600 s into {"time":0,"duration":0,"finished":false}. The test at src/store/index.test.ts:729-740 asserts only finished, so it does not catch this.

Repro (hypothesis). Play episode A to 10:00 and pause. Restart Obsidian. Click episode B in Latest Episodes, then open A again: it starts at 0:00.

Acceptance. Reproduced in real Obsidian first. After the fix, A resumes at 10:00 in the same flow, and an end-to-end test covers it.

Found by the PodNotes codebase audit. Not yet reproduced in Obsidian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions