improved accuracy of download success messages

main
Nick Zana 2 years ago
parent 790ce9e59b
commit 99c726dc2b

@ -81,10 +81,17 @@ impl Stream {
loop { loop {
match dl.run_async().await { match dl.run_async().await {
Ok(YoutubeDlOutput::SingleVideo(video)) => { Ok(YoutubeDlOutput::SingleVideo(video)) => {
println!("Successfully downloading video `{url:#?}`: {video:#?}"); println!(
"Successfully downloaded {} `{url:#?}`: {video:#?}",
if Some(true) == video.is_live {
"livestream"
} else {
"video"
}
);
} }
Ok(YoutubeDlOutput::Playlist(playlist)) => { Ok(YoutubeDlOutput::Playlist(playlist)) => {
println!("Successfully downloading playlist `{url:#?}`: {playlist:#?}"); println!("Successfully downloaded playlist `{url:#?}`: {playlist:#?}");
} }
Err(e) => { Err(e) => {
let err = if let youtube_dl::Error::ExitCode { stderr, .. } = e { let err = if let youtube_dl::Error::ExitCode { stderr, .. } = e {

Loading…
Cancel
Save