op.gg REST API doesn't track featured game modes (URF, ARAM Mayhem/Brawl).
Now uses Riot API for match history when RIOT_API_KEY env var is set,
falling back to op.gg REST for profile/ranked stats (no key needed).
- Add Riot API match fetcher with region routing (europe/americas/asia/sea)
- Add DDragon champion ID→name mapping for Riot API matches
- Add queue ID→name mapping (420=Ranked, 450=ARAM, 900=URF, etc.)
- Transform Riot match data to existing MatchEntry interface
- Batch match detail requests (5 at a time) for rate limit safety
- Keep op.gg REST as fallback when no API key is configured
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Profile now fetched via REST API (summoner lookup + summary endpoint)
- Match history via REST API games endpoint (proper JSON, no parser)
- All 10 players per game returned directly (no separate detail fetch)
- DDragon champion ID→name mapping loaded at startup
- Fixed summoner_id lookup to use # separator (was using - which failed)
- MCP kept as fallback for match detail and edge cases
- Frontend: find "me" by summoner name instead of assuming index 0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses op.gg REST API to trigger summoner data renewal before fetching
stats via MCP. Adds Update button in profile header for manual refresh.
Flow: lookup summoner_id → POST renewal → poll until finish → re-fetch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New plugin for League of Legends stats tracking, similar to op.gg:
- Search summoners by Riot ID (Name#Tag) + region
- Profile overview: rank, tier, LP, win rate, ladder position
- Top champions with KDA and win rates
- Match history with KDA, CS, items, game duration
- Expandable match details showing all 10 players
- Recent searches persisted across restarts
Uses op.gg MCP server (no API key needed, no 24h expiration).
Backend: server/src/plugins/lolstats/ (3 files)
Frontend: web/src/plugins/lolstats/ (2 files)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root cause: only /data/sounds/ survives container recreation (it's the
volume-mounted directory). /data/hub-state.json was written to the
container's ephemeral layer and lost on every redeploy.
- State file now saved to /data/sounds/hub-state.json
- Auto-migrates from legacy /data/hub-state.json if found
- Favorites and radio volumes will now persist across deploys
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- loadState: logs DATA_DIR path, writability check, lists files, shows
radio_favorites count on load
- saveState: read-back verification after atomic write, fallback to
direct write if rename fails
- /api/health: shows state diagnostics (file exists, file size, keys,
favorites count in memory vs disk, lastSaveOk)
- Helps diagnose why favorites are not persisting across deploys
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add voice channel member count (non-bot users) to soundboard
channel API response and display it in the dropdown, matching
the radio plugin's existing behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Atomic save: write to .tmp file then rename (prevents corruption
if container is killed mid-write)
- Backup: .bak copy created on successful load, used as fallback
if main file is corrupted
- Startup log shows loaded keys (verifies favorites survived)
Ensures radio_favorites and radio_volumes survive container
updates, crashes, and forced restarts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of destroying and recreating the voice connection on every
station change, now checks if the bot is already in the target channel.
If same channel: only stops ffmpeg/player, spawns new stream, reuses
the existing connection (no reconnect flicker).
If different channel: full disconnect + reconnect as before.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Globe was black because Radio Garden CDN (rg-tiles.b-cdn.net) returns
403 without Referer: radio.garden header. Added server-side tile proxy
/api/radio/tile/:z/:x/:y with in-memory cache (max 500 tiles).
- Added radio_voicestats SSE broadcast (every 5s) with voice ping,
gateway ping, status, channel name, and connected-since timestamp.
- Added clickable "Verbunden" connection indicator in RadioTab bottom
bar with live ping display and connection details modal (matching
soundboard's existing modal pattern).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each plugin now uses its own @discordjs/voice group:
- Radio: group='radio'
- Soundboard: group='soundboard'
This prevents joinVoiceChannel from one bot overwriting the
other bot's connection. Both bots can now play simultaneously
in the same voice channel. Removed claimVoice system (not needed
with separate bots).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each plugin gets its own Discord client and token:
- DISCORD_TOKEN_JUKEBOX (fallback: DISCORD_TOKEN) → Soundboard
- DISCORD_TOKEN_RADIO → Radio
discord.ts: factory createClient() instead of singleton
plugin.ts: per-plugin context storage via registerPlugin(p, ctx)
index.ts: creates/logins/shutdowns multiple bots independently
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Plugins now claim voice per guild via claimVoice(). When soundboard
plays a sound, radio's cleanup runs automatically (kills ffmpeg,
broadcasts SSE stop event). Fixes stale "now playing" UI on tab switch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Search API: read title/subtitle/url from _source.page (nested)
- Channel click: extract correct ID from URL (last segment)
- Replace earth texture with higher-res 4096x2048 original
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Server: inlineVolume on AudioResource, POST /api/radio/volume endpoint
- Volume persisted per guild, broadcast via SSE to all clients
- Frontend: volume slider in bottom bar with debounced API calls
- Volume icon changes based on level (muted/low/normal)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Jukebox has @snazzah/davey (Discord Audio Video Encryption) and ws
(WebSocket) as dependencies which were missing from the Gaming Hub.
Without davey, voice connections get stuck at 'signalling' because
Discord's voice servers require DAVE negotiation in @discordjs/voice 0.19.
Also removed unused prism-media (covered by @discordjs/opus).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Listen for state transitions and errors immediately after joinVoiceChannel,
not just after ensureConnectionReady succeeds. This will show if the
connection transitions at all internally or stays stuck at signalling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous wrapper intercepted wrong methods (library→adapter vs adapter→library).
Now correctly wraps:
- sendPayload (adapter→gateway): logs op code and return value
- onVoiceServerUpdate/onVoiceStateUpdate (gateway→library): logs incoming events
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Logs sendPayload calls (op code, result), onVoiceServerUpdate
and onVoiceStateUpdate to identify why connection stays at signalling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Log voice state transitions (Signalling → Connecting → Ready etc.)
- Log play requests with sound name, guild, channel, file path
- Log connection creation, rejoin attempts, and failures
- Log AudioPlayer state changes and errors
- All prefixed with [Soundboard] for easy filtering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- await sodium.ready + nacl preload (same as original jukebox)
- Add generateDependencyReport() for debugging
- Add type declarations for libsodium-wrappers and tweetnacl
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only request Guilds + GuildVoiceStates. GuildMembers, GuildPresences
and MessageContent are privileged and require manual portal activation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ADMIN_PWD and ALLOWED_GUILD_IDS env vars to config
- Extend PluginContext with adminPwd and allowedGuildIds
- Add adminAuth and guildFilter middleware for plugins
- Add /api/admin/login endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change SPA fallback from app.get('*') to app.get('/{*splat}')
as Express 5 uses path-to-regexp v8+ which requires named splat.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Radio Garden API Client (30K+ Orte, Sender-Suche, Stream-URL Auflösung)
- Discord Voice Streaming via ffmpeg (PCM Pipeline)
- Interactive 3D Globe (globe.gl) mit allen Radiosender-Standorten
- Sender-Panel mit Play/Stop/Favoriten
- Live-Suche nach Sendern und Städten
- Now-Playing Bar mit Equalizer-Animation
- Guild/Voice-Channel Auswahl
- SSE Broadcasting für Live-Updates
- Favoriten-System mit Persistenz
- Responsive Design (Mobile/Tablet/Desktop)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>