diff --git a/Cargo.toml b/Cargo.toml index 5f75343..6b0a842 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -221,6 +221,7 @@ tokio-02-marker = [] # Behaviour altering features. youtube-dlc = [] +yt-dlp = [] builtin-queue = [] # Used for docgen/testing/benchmarking. diff --git a/src/input/ytdl_src.rs b/src/input/ytdl_src.rs index 141cc16..ba03dc8 100644 --- a/src/input/ytdl_src.rs +++ b/src/input/ytdl_src.rs @@ -19,6 +19,8 @@ use tracing::trace; const YOUTUBE_DL_COMMAND: &str = if cfg!(feature = "youtube-dlc") { "youtube-dlc" +} else if cfg!(feature = "yt-dlp") { + "yt-dlp" } else { "youtube-dl" }; diff --git a/src/lib.rs b/src/lib.rs index 0c09160..d685d7e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,6 +37,9 @@ //! [`ConnectionInfo`]: struct@ConnectionInfo //! [lavalink]: https://github.com/freyacodes/Lavalink +#[cfg(all(feature = "youtube-dlc", feature = "yt-dlp"))] +compile_error!("feature \"youtube-dlc\" and feature \"yt-dlp\" cannot be enabled at the same time"); + mod config; pub mod constants; #[cfg(feature = "driver-core")]