feat: embed thumbnails for scdl and yt-dlp downloads

Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
Chaos Rogers 2025-09-09 13:55:24 +01:00
parent e112149ee4
commit c5addb147e

View file

@ -87,11 +87,23 @@ fn download_media(video_url: &str, download_path: &Path, settings: &Settings) ->
} else if video_url.contains("soundcloud.com") { } else if video_url.contains("soundcloud.com") {
println!("[INFO] Soundcloud link detected. Using scdl..."); println!("[INFO] Soundcloud link detected. Using scdl...");
cmd = Command::new("scdl"); cmd = Command::new("scdl");
cmd.args(["-l", video_url, "-c"]); cmd.args([
"-l",
video_url,
"-c",
"--write-thumbnail",
"--embed-thumbnail",
]);
} else { } else {
println!("[INFO] Non-Apple Music link. Using yt-dlp..."); println!("[INFO] Non-Apple Music link. Using yt-dlp...");
cmd = Command::new("yt-dlp"); cmd = Command::new("yt-dlp");
cmd.args(["-o", "%(title)s.%(ext)s", video_url]); cmd.args([
"-o",
"%(title)s.%(ext)s",
"--write-thumbnail",
"--embed-thumbnail",
video_url,
]);
} }
cmd.current_dir(download_path); cmd.current_dir(download_path);