From f811fed0d65bed62bb1c5a986f6f355d3b68612d Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 01:31:21 +0100 Subject: music: reject live streams on the yt-dlp path --- src/music.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/music.rs') diff --git a/src/music.rs b/src/music.rs index acec278..0b907d3 100644 --- a/src/music.rs +++ b/src/music.rs @@ -547,6 +547,13 @@ pub(crate) fn sanitize_yt_url(url: &str) -> String { } async fn build_input(request: &TrackRequest, http: &reqwest::Client) -> Result { + // yt-dlp would block forever collecting a live stream into memory (and + // `--match-filter !is_live` rejects the remaining cases). + if request.kind == SourceKind::YtDlp && is_live_stream_hint(&request.url) { + return Err(Error::Custom( + "live streams are not supported through yt-dlp".into(), + )); + } if request.compressed { let audio_bytes = match request.kind { SourceKind::YtDlp => { -- cgit v1.2.3