Skip to content

The timestamp in the share URL should override the saved position for the user.#5163

Open
pjkottke wants to merge 1 commit intoadvplyr:masterfrom
pjkottke:master
Open

The timestamp in the share URL should override the saved position for the user.#5163
pjkottke wants to merge 1 commit intoadvplyr:masterfrom
pjkottke:master

Conversation

@pjkottke
Copy link
Copy Markdown

@pjkottke pjkottke commented Apr 2, 2026

Brief summary

When a share link includes a ?t= query parameter specifying a start time, it should seek to that position rather than resuming from the listener's previously cached position.

Which issue is fixed?

No existing issue, this is a new bug fix.

In-depth Description

Share links support a ?t= query parameter for specifying a start time. However, when a returning visitor has an active share session (via share_session_id cookie), the server returns the cached currentTime from that session and ignores the ?t parameter entirely.
The fix is in ShareController.getMediaItemShareBySlug: when an existing session is found and returned early, ?t is now checked and applied to playbackSession.currentTime before the response is sent. The client (_slug.vue) is also updated to prefer ?t over playbackSession.currentTime as a belt-and-suspenders guard.
This is useful any time someone wants to share a link to a specific moment (a particular chapter or scene) with someone who has already listened to part of the same share.

How have you tested this?

npm test

Created a share link for an audiobook
Opened the link and listened for ~30 seconds (establishing a cached session)
Reloaded the page - confirmed it resumed from the cached position (expected baseline behavior)
Appended ?t=120 to the URL and reloaded - confirmed playback started at 2:00 rather than the cached position
Removed ?t and reloaded - confirmed it returned to resuming from cached position

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants