feat: playlist shuffle, lazy resolution, TTS ducking, kept repair
Some checks failed
CI / gitleaks (push) Failing after 3s
CI / lint (push) Successful in 22s
CI / test (3.11) (push) Failing after 2m47s
CI / test (3.13) (push) Failing after 2m52s
CI / test (3.12) (push) Failing after 2m54s
CI / build (push) Has been skipped

Music:
- #random URL fragment shuffles playlist tracks before enqueuing
- Lazy playlist resolution: first 10 tracks resolve immediately,
  remaining are fetched in a background task
- !kept repair re-downloads kept tracks with missing local files
- !kept shows [MISSING] marker for tracks without local files
- TTS ducking: music ducks when merlin speaks via voice peer,
  smooth restore after TTS finishes

Performance (from profiling):
- Connection pool: preload_content=True for SOCKS connection reuse
- Pool tuning: 30 pools / 8 connections (up from 20/4)
- _PooledResponse wrapper for stdlib-compatible read interface
- Iterative _extract_videos (replace 51K-deep recursion with stack)
- proxy=False for local SearXNG

Voice + multi-bot:
- Per-bot voice config lookup ([<username>.voice] in TOML)
- Mute detection: skip duck silence when all users muted
- Autoplay shuffle deck (no repeats until full cycle)
- Seek clamp to track duration (prevent seek-past-end stall)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-22 16:21:47 +01:00
parent 6d6b957557
commit 6083de13f9
17 changed files with 1706 additions and 118 deletions

View File

@@ -178,3 +178,25 @@
- [x] Autoplay shuffled kept tracks on reconnect (silence detection)
- [x] Alias plugin (!alias add/del/list)
- [x] Container management tools (tools/build, start, stop, restart, nuke, logs, status)
## v2.4.0 -- Music Discovery + Performance
- [ ] Last.fm integration (artist.getSimilar, artist.getTopTags, track.getSimilar)
- [ ] `!similar` command (find similar artists, optionally queue via YouTube)
- [ ] `!tags` command (genre/style tags for current track)
- [x] Pause/unpause (`!pause` toggle, position tracking, stale re-download)
- [x] Autoplay continuous radio (random kept, silence-aware, cooldown between tracks)
- [x] Periodic resume persistence (10s interval, survives hard kills)
- [x] Track duration in `!np` (elapsed/total via ffprobe)
- [x] `!announce` toggle (optional track announcements)
- [x] Direct bot addressing (`merlin: say <text>`, TTS via voice peer)
- [x] Self-deafen on connect
- [x] Fade-out click fix (conditional buffer clear, post-fade drain)
- [x] cProfile analysis tool (`tools/profile`)
- [x] Mute detection: skip duck silence when all users muted
- [x] Autoplay shuffle deck (no repeats until full cycle)
- [x] Seek clamp to track duration (prevent seek-past-end stall)
- [x] Iterative `_extract_videos` (replace 51K-deep recursion with stack)
- [x] Bypass SOCKS5 for local SearXNG (`proxy=False`)
- [x] Connection pool: `preload_content=True` for SOCKS connection reuse
- [x] Pool tuning: 30 pools / 8 connections (up from 20/4)