improved accuracy of download success messages

main
Nick Zana 12 months ago
parent 790ce9e59b
commit 99c726dc2b

@ -81,10 +81,17 @@ impl Stream {
loop {
match dl.run_async().await {
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)) => {
println!("Successfully downloading playlist `{url:#?}`: {playlist:#?}");
println!("Successfully downloaded playlist `{url:#?}`: {playlist:#?}");
}
Err(e) => {
let err = if let youtube_dl::Error::ExitCode { stderr, .. } = e {

Loading…
Cancel
Save