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: update downloader registration to use Arc instead of Box

Tonho45aab1ede5b4
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 64e96387..74dba19c 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -36,7 +36,7 @@ pub fn run() {
let session = Arc::new(tokio::sync::Mutex::new(None));
let mut registry = core::registry::PlatformRegistry::new();
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::hotmart::downloader::HotmartDownloader::new(
session.clone(),
models::settings::AppSettings::default().download,
@@ -44,28 +44,28 @@ pub fn run() {
3,
),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::instagram::InstagramDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::pinterest::PinterestDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::tiktok::TikTokDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::twitter::TwitterDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::twitch::TwitchClipsDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::bluesky::BlueskyDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::reddit::RedditDownloader::new(),
));
- registry.register(Box::new(
+ registry.register(Arc::new(
platforms::vimeo::VimeoDownloader::new(),
));