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:
parent
e112149ee4
commit
c5addb147e
1 changed files with 14 additions and 2 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -87,11 +87,23 @@ fn download_media(video_url: &str, download_path: &Path, settings: &Settings) ->
|
|||
} else if video_url.contains("soundcloud.com") {
|
||||
println!("[INFO] Soundcloud link detected. Using scdl...");
|
||||
cmd = Command::new("scdl");
|
||||
cmd.args(["-l", video_url, "-c"]);
|
||||
cmd.args([
|
||||
"-l",
|
||||
video_url,
|
||||
"-c",
|
||||
"--write-thumbnail",
|
||||
"--embed-thumbnail",
|
||||
]);
|
||||
} else {
|
||||
println!("[INFO] Non-Apple Music link. Using 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue