Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat(medcel): update media info structure for course details and improve error messaging

Tonho07c8339926c5
diff --git a/src-tauri/src/platforms/medcel/mod.rs b/src-tauri/src/platforms/medcel/mod.rs
index ea4f782b..1bda2a68 100644
--- a/src-tauri/src/platforms/medcel/mod.rs
+++ b/src-tauri/src/platforms/medcel/mod.rs
@@ -1,3 +1,6 @@
+pub mod api;
+pub mod downloader;
+
use anyhow::anyhow;
use async_trait::async_trait;
use tokio::sync::mpsc;
@@ -39,13 +42,13 @@ impl PlatformDownloader for MedcelDownloader {
async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
Ok(MediaInfo {
- title: "Medcel".to_string(),
+ title: "Medcel Course".to_string(),
author: String::new(),
platform: "medcel".to_string(),
duration_seconds: None,
thumbnail_url: None,
available_qualities: vec![VideoQuality {
- label: "Original".to_string(),
+ label: "course".to_string(),
width: 0,
height: 0,
url: url.to_string(),
@@ -62,6 +65,8 @@ impl PlatformDownloader for MedcelDownloader {
_opts: &DownloadOptions,
_progress: mpsc::Sender<f64>,
) -> anyhow::Result<DownloadResult> {
- Err(anyhow!("Use the courses interface to download from Medcel"))
+ Err(anyhow!(
+ "Use the courses interface to download Medcel courses"
+ ))
}
}