From 5268d86b1756229ac26706afa150791dc38622ec Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Sun, 22 Mar 2026 12:08:47 +0100 Subject: [PATCH] fix: add missing tokio features and correct doc-test examples --- Cargo.toml | 2 +- src/lib.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8931bb4..58055be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ readme = "README.md" [dependencies] regex = "1.11.1" thiserror = "2.0.11" -tokio = { version = "1.43.0", features = ["process", "rt", "macros", "fs"] } +tokio = { version = "1.43.0", features = ["process", "rt", "rt-multi-thread", "macros", "fs"] } serde = { version = "1.0.217", features = ["derive"] } serde_json = "1.0.138" diff --git a/src/lib.rs b/src/lib.rs index 6bb6ffd..79bec21 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ //! let ytd = YtDlp::new("https://www.youtube.com/watch?v=uTO0KnDsVH0") //! .output_dir(path) //! .arg("--quiet") -//! .arg("--output", "%(title).90s.%(ext)s"); +//! .arg_with("--output", "%(title).90s.%(ext)s"); //! //! let result = ytd.download().await?; //! println!("Download complete: {}", result.output()); @@ -195,7 +195,6 @@ impl YtDlp { #[cfg(test)] mod tests { use super::*; - use std::env; #[tokio::test] async fn test_version() -> Result<()> { @@ -209,9 +208,6 @@ mod tests { #[tokio::test] async fn test_get_info() -> Result<()> { - // Use a very short/small video for testing if possible, or just check if it fails - // For local tests, we'll just check if it can spawn. - let ytd = YtDlp::new("https://www.youtube.com/watch?v=uTO0KnDsVH0"); // We won't actually download in CI if it's too slow, but let's try a version check as a proxy let version = YtDlp::new("").arg("--version").download().await?; println!("yt-dlp version: {}", version.output());