fix: handle SoundCloud URLs with query parameters
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
parent
7eaff29e6d
commit
b7392fc7b4
1 changed files with 2 additions and 1 deletions
|
|
@ -86,10 +86,11 @@ 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...");
|
||||||
|
let clean_url = video_url.split('?').next().unwrap();
|
||||||
cmd = Command::new("scdl");
|
cmd = Command::new("scdl");
|
||||||
cmd.args([
|
cmd.args([
|
||||||
"-l",
|
"-l",
|
||||||
video_url,
|
clean_url,
|
||||||
"-c",
|
"-c",
|
||||||
"--onlymp3",
|
"--onlymp3",
|
||||||
"--yt-dlp-args",
|
"--yt-dlp-args",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue