Skip to content

fix: use seekable resource for seeks instead of refetching - #220

Merged
ToddyTheNoobDud merged 1 commit into
PerformanC:devfrom
Akinori107:dev
Aug 9, 2026
Merged

fix: use seekable resource for seeks instead of refetching#220
ToddyTheNoobDud merged 1 commit into
PerformanC:devfrom
Akinori107:dev

Conversation

@Akinori107

Copy link
Copy Markdown

Changes

Added seek support using createSeekeableAudioResource in _connectAndPlayStream, so it skips the full re-fetch/reconnect when seeking. Falls back to the old _fetchResource method if it fails or the source/protocol isn't supported (local, deezer, sabr, hls, dash)

Why

&t=X timestamps were always ignored, track just started from 0 regardless of position. It's actually worse than just "seek doesn't work" though, since track-end is scheduled based on trackLength - startPosition, the track gets cut off early too. e.g. seek to 1:43 on a 2:34 track and it'll stop around 0:51 of real playback, since the audio was actually playing from 0:00 the whole time.

Checkmarks

  • The modified endpoints have been tested
  • Used the same indentation as the rest of the project
  • Still compatible with LavaLink clients

Additional information

tsc + biome pass

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

All Contributors have signed the CLA. The PR is now allowed to be merged.
Posted by the CLA Assistant Lite bot.

@Akinori107

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

performanc-bot added a commit to PerformanC/CLA-Signatures that referenced this pull request Aug 8, 2026
@ToddyTheNoobDud

Copy link
Copy Markdown
Member

Thanks for your contribuition! :)

@ToddyTheNoobDud
ToddyTheNoobDud merged commit d62d5f0 into PerformanC:dev Aug 9, 2026
1 of 2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 9, 2026
@1Lucas1apk

Copy link
Copy Markdown
Member

Thank you for finding and fixing the problem, eternally grateful ✨

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants