Skip to content

Commit

Permalink
improve logging on yt-dlp command error
Browse files Browse the repository at this point in the history
  • Loading branch information
madiele committed Aug 15, 2024
1 parent 20ff99b commit c891ac3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/provider/youtube.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,10 @@ async fn get_youtube_stream_url(url: &Url) -> eyre::Result<Url> {
Ok(url) => Ok(url),
Err(e) => {
warn!(
"error while parsing stream url:\ninput: {}\nerror: {}",
"error while parsing stream url using yt-dlp:\nerror: {}\nyt-dlp stdout: {}\nyt-dlp stderr: {}",
e.to_string(),
raw_url,
e.to_string()
std::str::from_utf8(&x.stderr).unwrap_or_default()
);
Err(eyre::eyre!(e))
}
Expand Down Expand Up @@ -805,4 +806,3 @@ mod tests {
}
}
}

0 comments on commit c891ac3

Please sign in to comment.