From 47ff64585b5c523c01d2b8161cf15fbca707acd7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 23 Jul 2023 20:21:36 +0100 Subject: [PATCH] replace youtube-dl with yt-dlp --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 04951d2..364eb60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -122,8 +122,10 @@ fn is_already_downloaded(link: &Link, file_name: &str) -> Result { fn download_audio(link: &Link) -> Result<()> { use std::process::Command; + let cmd = "yt-dlp"; println!("download audio for {}", link.href()); - let output = Command::new("youtube-dl") + println!("{} --extract-audio --audio-format mp3 {}", cmd, &link.href); + let output = Command::new(cmd) .arg("--extract-audio") .arg("--audio-format") .arg("mp3")