replace youtube-dl with yt-dlp

This commit is contained in:
Paul Campbell 2023-07-23 20:21:36 +01:00
parent 60dffe9824
commit 47ff64585b

View file

@ -122,8 +122,10 @@ fn is_already_downloaded(link: &Link, file_name: &str) -> Result<bool> {
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")