mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
Fix ffmpeg spawn failure causing infinite retry loop
Two issues fixed: 1. Cross-platform ffmpeg-static resolution: skip Windows .exe paths on Linux and always fall back to "ffmpeg" instead of a known-bad path 2. Prevent trackEnd cascade when ffmpeg spawn fails — track consecutive failures and stop after 3, suppressing trackEnd on spawn errors https://claude.ai/code/session_013vHRF8BbDGjZLqheFS85Q6
This commit is contained in:
3 files changed
+47
-5
No files matched your search
@@ -263,6 +263,8 @@ export class BotInstance extends EventEmitter {
|
||||
this.queue.add({ ...song, platform: provider.platform });
|
||||
this.queue.play();
|
||||
|
||||
// Reset failure counter on user-initiated play
|
||||
this.player.resetFailures();
|
||||
const ok = await this.resolveAndPlay(this.queue.current()!);
|
||||
if (!ok) return `Cannot play: ${song.name}`;
|
||||
return `Now playing: ${song.name} - ${song.artist}`;
|
||||
|
||||
Reference in new issue
Block a user