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
feat(areademembros): implement AreaDeMembrosDownloader with media info retrieval and URL handling
Tonho53c3086ef476
diff --git a/src-tauri/omniget-plugin-courses/src/platforms/areademembros/mod.rs b/src-tauri/omniget-plugin-courses/src/platforms/areademembros/mod.rsnew file mode 100644index 00000000..f812e3d1--- /dev/null+++ b/src-tauri/omniget-plugin-courses/src/platforms/areademembros/mod.rs@@ -0,0 +1,63 @@+pub mod api;+pub mod downloader;++use anyhow::anyhow;+use async_trait::async_trait;+use tokio::sync::mpsc;++use omniget_core::models::media::{DownloadOptions, DownloadResult, MediaInfo, MediaType};+use crate::platforms::traits::PlatformDownloader;++pub struct AreaDeMembrosDownloader;++impl AreaDeMembrosDownloader {+ pub fn new() -> Self {+ Self+ }+}++impl Default for AreaDeMembrosDownloader {+ fn default() -> Self {+ Self::new()+ }+}++#[async_trait]+impl PlatformDownloader for AreaDeMembrosDownloader {+ fn name(&self) -> &str {+ "areademembros"+ }++ fn can_handle(&self, url: &str) -> bool {+ if let Ok(parsed) = url::Url::parse(url) {+ if let Some(host) = parsed.host_str() {+ let host = host.to_lowercase();+ return host == "areademembros.com"+ || host.ends_with(".areademembros.com");+ }+ }+ false+ }++ async fn get_media_info(&self, _url: &str) -> anyhow::Result<MediaInfo> {+ Ok(MediaInfo {+ title: "Area de Membros".to_string(),+ author: String::new(),+ platform: "areademembros".to_string(),+ duration_seconds: None,+ thumbnail_url: None,+ available_qualities: vec![],+ media_type: MediaType::Course,+ file_size_bytes: None,+ })+ }++ async fn download(+ &self,+ _info: &MediaInfo,+ _opts: &DownloadOptions,+ _progress: mpsc::Sender<f64>,+ ) -> anyhow::Result<DownloadResult> {+ Err(anyhow!("Use the courses interface to download from Area de Membros"))+ }+}