Skip to content

sync: v3 < dev#206

Merged
1Lucas1apk merged 35 commits into
v3from
dev
Apr 29, 2026
Merged

sync: v3 < dev#206
1Lucas1apk merged 35 commits into
v3from
dev

Conversation

@1Lucas1apk
Copy link
Copy Markdown
Member

Changes

Write here about the changes you've made

Why

Write here why you think this should be merged

Checkmarks

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

Additional information

If you have any additional information, write it here

1Lucas1apk and others added 30 commits April 5, 2026 21:38
Updates official API fallbacks to comply with February/March 2026 changes:
- Official playlist resolution now uses /items endpoint and items field
- Removed deprecated /artists/{id}/top-tracks official fallback
- Capped official search limit at 10 to meet new API constraints
- Introduced SpotifyPlaylistItem typing to remove explicit any
- Applied Biome linting and formatting fixes
- Enables automatic initialization using anonymous web/mobile tokens
- Implements dynamic fallback between official, anonymous, and mobile tiers
- Optimizes ISRC retrieval by prioritizing anonymous mobile tokens
- Supports high-concurrency by immediate tier-switching on rate limits
- Migrates official playlist resolution to /items endpoint (2026 API)
- Eliminates explicit 'any' and applies Biome linting/formatting
- Enables automatic initialization using anonymous web/mobile tokens
- Implements dynamic fallback between official, anonymous, and mobile tiers
- Optimizes ISRC retrieval by prioritizing anonymous mobile tokens
- Supports high-concurrency by immediate tier-switching on rate limits
- Migrates official playlist resolution to /items endpoint (2026 API)
- Eliminates explicit 'any' and applies Biome linting/formatting
- Adds multi-process support (Master, Voice, Source, and Micro-workers)
- Introduces structured hook system (callHook/callHookAsync)
- Enriches hooks with 'guildId' and session context
- Adds hooks for REST requests, WebSocket traffic, and IPC messages
- Implements WebSocket socket tagging for automated guild identification
- Fixes circular dependencies and ensures strict type safety
fix: align seek position and startTime handling
use os.availableParallelism() for accurate container-aware worker limits
(this benefits Pterodactyl usage from what i researched)
add p50/p95/p99 event loop lag percentiles for better tail latency
detection
penalize workers with frame deficits and stuck recoveries in cost
calculation
due to falsy condition being used instead of equality check with undefined
When stuckRecoveryCount exceeds the limit, it will emit trackStuck and
stop the track (should fix infinite recovery loops ? )
check the comment above it.
removed refer and origin from the DASH, normally these are not sent when
playing (not required to function, and if added back again as the
monochrome.tf url its gonna error 403.)
i commited a change disabling it yesterday and they fixed it with the
latest version today, holy.
Allow clients to reconnect and recover their players after a dropped
WebSocket connection without restarting playback.

How it works:
1. Client sends PATCH /v4/sessions/:id with { resuming: true, timeout: 60 }
2. On disconnect, NodeLink moves the session to the resumable pool and
   starts a countdown (session.timeout seconds).
3. While paused, events destined for the session are queued in
   session.eventQueue (only when resuming is enabled).
4. Client reconnects with the same Session-ID header.
5. NodeLink calls sessions.resume(), restores the socket, flushes the
   queued events, and returns a ready payload with resumed: true.
6. If the client does not reconnect within the timeout, the session and
   all its players are destroyed normally.

Changes:
- sessionManager.ts: guard against double-pause; set socket = null on
  pause to prevent ghost sends; log the configured timeout value.
- index.ts: sendEventToSession only queues events when session.resuming
  is true, preventing unbounded queue growth for plain disconnects.
1Lucas1apk and others added 5 commits April 21, 2026 22:52
feat(sessions): implement session resuming support
This commit updates the CLA Assistant used in the project to include a fix.

Signed-off-by: toddynnn <86982643+ToddyTheNoobDud@users.noreply.github.com>
Signed-off-by: toddynnn <86982643+ToddyTheNoobDud@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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


3 out of 5 committers have signed the CLA.
✅ (Tomato6966)[https://github.com/Tomato6966]
✅ (dripink)[https://github.com/dripink]
✅ (1Lucas1apk)[https://github.com/1Lucas1apk]
@ToddyTheNoobDud
@UnschooledGamer
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@1Lucas1apk
Copy link
Copy Markdown
Member Author

I decline.

@1Lucas1apk
Copy link
Copy Markdown
Member Author

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

@1Lucas1apk 1Lucas1apk merged commit 6b6ad69 into v3 Apr 29, 2026
1 check failed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
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.

5 participants