From 5b5caee512dd82bc5106e69259ba916cd143deda Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 21 Mar 2025 19:41:54 +0100 Subject: refactor(yt_dlp): Remove the unneeded `async` from the public functions --- crates/yt_dlp/src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crates/yt_dlp/src/lib.rs') diff --git a/crates/yt_dlp/src/lib.rs b/crates/yt_dlp/src/lib.rs index 40610c2..c6d9290 100644 --- a/crates/yt_dlp/src/lib.rs +++ b/crates/yt_dlp/src/lib.rs @@ -332,9 +332,8 @@ pub fn add_hooks<'a>(opts: Bound<'a, PyDict>, py: Python<'_>) -> PyResult, ie_result: InfoJson, download: bool, @@ -378,9 +377,8 @@ pub async fn process_ie_result( /// /// @param `extra_info` Dictionary containing the extra values to add to the info (For internal use only) /// @`force_generic_extractor` Force using the generic extractor (Deprecated; use `ie_key`='Generic') -#[allow(clippy::unused_async)] #[allow(clippy::missing_panics_doc)] -pub async fn extract_info( +pub fn extract_info( yt_dlp_opts: &Map, url: &Url, download: bool, @@ -460,7 +458,7 @@ pub fn unsmuggle_url(smug_url: &Url) -> PyResult { /// /// # Panics /// Only if `yt_dlp` changes their `info_json` schema. -pub async fn download( +pub fn download( urls: &[Url], download_options: &Map, ) -> Result, YtDlpError> { @@ -468,7 +466,7 @@ pub async fn download( for url in urls { info!("Started downloading url: '{}'", url); - let info_json = extract_info(download_options, url, true, true).await?; + let info_json = extract_info(download_options, url, true, true)?; // Try to work around yt-dlp type weirdness let result_string = if let Some(filename) = info_json.filename { -- cgit 1.4.1