Update bundled yt-dlp and report source failures in chat

The image shipped a year-old yt-dlp, which YouTube now rejects with
"The page needs to be reloaded". Bumped to 2026.08.19 and documented
rebuilding as the standard fix, including how to pass a newer tag
without waiting for a repository update.

A downloader dying mid-stream also looked exactly like a very short
track: ffmpeg saw EOF, the player advanced, and the channel only got
"queue finished". The failure reason now reaches the chat.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-09-08 23:45:25 +03:00
co-authored by Claude Opus 5
parent 823a9f1565
commit 315760e076
5 changed files with 341 additions and 293 deletions
+8
View File
@@ -276,6 +276,14 @@ export class GuildPlayer extends EventEmitter<GuildPlayerEvents> {
// stop() rebuilds the volume transformer, so volume is applied per track.
media.setVolume(this.volume / 100);
this.startTicker();
// A downloader that dies mid-stream just looks like a very short track, so
// say why instead of silently moving on.
void input.failure?.then((reason) => {
if (!reason || this.current?.id !== track.id) return;
this.log.warn({ reason, track: track.title }, "source failed while streaming");
this.notify(`⚠️ **${track.title}** — источник отдал ошибку: ${reason}`);
});
} catch (err) {
this.log.warn({ err, track: track.title }, "playback failed");
const message = err instanceof UserFacingError ? err.message : "неизвестная ошибка";