Skip to content

sync: v3 < dev#198

Merged
1Lucas1apk merged 315 commits intov3from
dev
Apr 4, 2026
Merged

sync: v3 < dev#198
1Lucas1apk merged 315 commits intov3from
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 February 11, 2026 01:02
convert voice module to typescript
Refactor HLS Module: TypeScript Migration and Functional Playlist Parser
improve: port playback processing modules to TypeScript
improve: port DES and Blowfish decrypters to TypeScript
i forgot to re-change it back to fmp4-buffered, this should reduce/fix the lag.
improve: migrate filters to TypeScript and enhance implementations
videoDetails still returned even without sts.
this also fixes audiomack seek crashing the mp4box
- move jsdom to initialize() to reduce import overhead
- reduce Heap Used on import: 55MB -> 10MB
- reduce RSS on import: 140MB -> 94MB
- add 10-minute idle cleanup for JSDOM resources
if you want to run this with ts-node instead of tsx, this fixes some crashes with paths.
tho, tsx is still recommended for better performance and stability.
Refactor master and worker startup paths to reduce eager memory use and improve scaling behavior.

Changes included:

- Removed OpenSSL legacy provider from the default Node start script.

- Reduced eager allocations in the cluster primary startup path.

- Added staged memory tracing points to track RSS and heap growth during boot.

- Preserved requested player manager flow while keeping lazy boundaries for heavy modules.

- Kept nullable manager handling safe in API and shutdown paths.

- Improved source worker process management to start with one worker and scale up by load.

- Added load threshold and cooldown controls for source worker scale up.

- Added dynamic micro worker scaling in source worker thread pool.

- Extended source worker typing with scaleUpThreshold and scaleCooldownMs options.

- Maintained type safety and validated with npm run -s type-check.

Result:

- Lower baseline memory pressure in orchestration mode.

- More proportional source concurrency expansion under real demand.
feat: add short URL and multi-page video support
Make subscribeLyrics return immediately and load lyrics in background with safe error handling.

Make unsubscribeLyrics async and resolve immediately for consistent command latency.

Route heavy non-guild commands to request-scoped parallel queues instead of the global queue.

Clean up empty worker queue entries to avoid queue map growth.
Generate and track transpiled JavaScript output in dist/.

Add build and start:dist scripts in package.json.

Load runtime config files from the project root path.
Add internal fallback when YouTube clients fail.

Use only validated direct searchable sources.

Block mirror-only, TTS, and invalid fallback sources.

Update default fallbackSources and remove Eternalbox.
- Added TapeTransformer with Catmull-Rom interpolation for artifact-free resampling.
- Integrated tape ramps for pause, resume, and stop events in Player.ts.
- Implemented 300ms pipeline drain delay to ensure silence in Discord buffer.
- Added active polling for ramp completion to synchronize state transitions.
- Updated config.default.js with tape/volume fading options and documentation.
- Ensured Biome lint compliance across all modified files.
- Extract HLS editorial videos for tracks, albums, playlists, and artists in Apple Music.
- Refactor TapeTransformer to extend Transform and implement Catmull-Rom resampling.
- Fix TypeScript compiler errors in player and stream processor.
- Implement active ramp monitoring and 300ms drain delay for clean pauses.
ToddyTheNoobDud and others added 17 commits March 28, 2026 19:40
here some cool stuff i found out: PassThrough was always beign created
even with HLSHandler, causing a big memory leak.
Preferred playback is now DASH over HLS, since dash provides audio only
tracks with a good quality/bitrate.
well, here some cool stuff that i found out and fixed too:
fixed a potoken race condition, now it should prevent multiple requests
with potokens.
improved the stall detector to be more accurate during recovery and
actually respect the downloadedMs.
improved the handling for stream protection status 2, now it should not
spam a lot of requests.

i would consider this is actually stable to use atm, but not 100% sure
about it.
@1Lucas1apk
Copy link
Copy Markdown
Member Author

Updating the documents is going to be a nightmare.

ToddyTheNoobDud and others added 10 commits April 3, 2026 09:13
This is designed specially for monochrome source, since its the default
one for playback.
Preffered format for now is AACLC over FLAC, since i still need to fix
some stuff related to the FLAC playaback.
HLS works fine with monochrome, but i think the dash version provides
better quality and audio normalization, while also fixing the stutters
and reducing the memory usage by a lot.
read/peek/getContiguous no longer leak pooled buffers
write() truncates oversized chunks instead of over-reading
remove useless bufferPool.release() in MPEGTSDemuxer
- Prevent premature audio halt in transformers at low rates.
- Fix buffer overflow logic to advance read position.
- Increase FlowController flush duration to 10 seconds.
- Improve end-of-track detection leniency during slow ramps.
- Add safety timeout for long fade-out ramps.
- Rebuild distribution files.
- Implement initial latency check during setup to score and prioritize fast instances.
- Add 5-second timeout to API requests to prevent worker hanging on dead servers.
- Sync health scores between API and streaming pools.
- Increase selection randomization to prevent instance overloading.
eternalboxJump and icyMetadata listeners now properly cleanup on stream
close/error.
fix DASH stuck loops

Cap AACDecoderStream pendingChunks at 200, drop oldest when full to
prevent unbounded growth
Clear pendingChunks on destroy to release held buffers and callbacks
Optimize _tightBuffer to skip Buffer.from() when buffer is already tight
Clean up audioStream data listener on close/end to prevent leak during
reconnects
DASHHandler: increase prefetch from 1 to 4 and cap segment pace at 5s to
prevent stuck recovery loops
Prevents repeated URL refresh attempts while track is paused
@1Lucas1apk 1Lucas1apk merged commit 4f38f9a into v3 Apr 4, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 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.

8 participants