Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
fix: add download_hls_with_quality function to MediaProcessor for enhanced HLS downloading
Tonhoa8dad7efe98a
diff --git a/src-tauri/src/core/media_processor.rs b/src-tauri/src/core/media_processor.rsindex 3b03cb83..9e41f902 100644--- a/src-tauri/src/core/media_processor.rs+++ b/src-tauri/src/core/media_processor.rs@@ -4,6 +4,7 @@ use tokio_util::sync::CancellationToken;pub struct MediaProcessor;impl MediaProcessor {+ #[allow(clippy::too_many_arguments)]pub async fn download_hls(m3u8_url: &str,output: &str,@@ -21,6 +22,25 @@ impl MediaProcessor {downloader.download(m3u8_url, output, referer, bytes_tx, cancel_token, max_concurrent, max_retries).await}+ #[allow(clippy::too_many_arguments)]+ pub async fn download_hls_with_quality(+ m3u8_url: &str,+ output: &str,+ referer: &str,+ bytes_tx: Option<tokio::sync::mpsc::UnboundedSender<u64>>,+ cancel_token: CancellationToken,+ max_concurrent: u32,+ max_retries: u32,+ client: Option<reqwest::Client>,+ max_height: Option<u32>,+ ) -> anyhow::Result<HlsDownloadResult> {+ let downloader = match client {+ Some(c) => crate::core::hls_downloader::HlsDownloader::with_client(c),+ None => crate::core::hls_downloader::HlsDownloader::new(),+ };+ downloader.download_with_quality(m3u8_url, output, referer, bytes_tx, cancel_token, max_concurrent, max_retries, max_height).await+ }+pub async fn remux(input: &str, output: &str) -> anyhow::Result<()> {let status = crate::core::process::command("ffmpeg").args(["-y", "-i", input, "-c", "copy", output])