Skip to content

Commit

Permalink
Docs: describe youtube-dlc feature
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMcFelix committed Nov 13, 2020
1 parent 6702520 commit 45b1fb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/input/ytdl_src.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const YOUTUBE_DL_COMMAND: &str = if cfg!(feature = "youtube-dlc") {
};

/// Creates a streamed audio source with `youtube-dl` and `ffmpeg`.
///
/// Uses `youtube-dlc` if the `youtube-dlc` feature is enabled.
pub async fn ytdl(uri: &str) -> Result<Input> {
_ytdl(uri, &[]).await
}
Expand Down Expand Up @@ -106,7 +108,7 @@ pub(crate) async fn _ytdl(uri: &str, pre_args: &[&str]) -> Result<Input> {
))
}

/// Creates a streamed audio source from YouTube search results with `youtube-dl`,`ffmpeg`, and `ytsearch`.
/// Creates a streamed audio source from YouTube search results with `youtube-dl(c)`,`ffmpeg`, and `ytsearch`.
/// Takes the first video listed from the YouTube search.
pub async fn ytdl_search(name: &str) -> Result<Input> {
ytdl(&format!("ytsearch1:{}", name)).await
Expand Down

0 comments on commit 45b1fb1

Please sign in to comment.