diff options
Diffstat (limited to 'src/music.rs')
| -rw-r--r-- | src/music.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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 { | |||
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | async fn build_input(request: &TrackRequest, http: &reqwest::Client) -> Result<Input> { | 549 | async fn build_input(request: &TrackRequest, http: &reqwest::Client) -> Result<Input> { |
| 550 | // yt-dlp would block forever collecting a live stream into memory (and | ||
| 551 | // `--match-filter !is_live` rejects the remaining cases). | ||
| 552 | if request.kind == SourceKind::YtDlp && is_live_stream_hint(&request.url) { | ||
| 553 | return Err(Error::Custom( | ||
| 554 | "live streams are not supported through yt-dlp".into(), | ||
| 555 | )); | ||
| 556 | } | ||
| 550 | if request.compressed { | 557 | if request.compressed { |
| 551 | let audio_bytes = match request.kind { | 558 | let audio_bytes = match request.kind { |
| 552 | SourceKind::YtDlp => { | 559 | SourceKind::YtDlp => { |
