added YoutubeDLError for better error handling

This commit is contained in:
Nils Pukropp committed 2021-07-18 17:47:30 +02:00
1 parent eacdceaaaf
commit cfa2303d46
2 files changed
+82 -38

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ use ytd_rs::{YoutubeDL, ResultType, Arg};
// one doesn't take any input and is an option, the other takes the desired output format as input
let args = vec![Arg::new("--quiet"), Arg::new_with_arg("--output", "%(title).90s.%(ext)s")];
let link = "https://www.youtube.com/watch?v=uTO0KnDsVH0";
let ytd = YoutubeDL::new("./path/to/download/directory", args, link).unwrap();
let ytd = YoutubeDL::new("./path/to/download/directory", args, link)?;
// start download
let download = ytd.download();