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(rebrand): update rpc constants, banner, and test paths to LibreGet
IGECTdf561504c7ee
diff --git a/src-tauri/src/core/cas.rs b/src-tauri/src/core/cas.rsindex d8774484..61a0b009 100644--- a/src-tauri/src/core/cas.rs+++ b/src-tauri/src/core/cas.rs@@ -123,7 +123,7 @@ mod tests {fn tmp(nome: &str) -> PathBuf {let d = std::env::temp_dir().join(format!(- "omniget-cas-{nome}-{}",+ "libreget-cas-{nome}-{}",std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap()diff --git a/src-tauri/src/core/portable.rs b/src-tauri/src/core/portable.rsindex 46579568..c18c333e 100644--- a/src-tauri/src/core/portable.rs+++ b/src-tauri/src/core/portable.rs@@ -29,7 +29,9 @@ pub fn portable_webview_dir_from_env() -> Option<PathBuf> {if std::env::var("LIBREGET_PORTABLE").ok().as_deref() != Some("1") {return None;}- let data_dir = std::env::var("OMNIGET_DATA_DIR").ok()?;+ let data_dir = std::env::var("LIBREGET_DATA_DIR")+ .or_else(|_| std::env::var("OMNIGET_DATA_DIR"))+ .ok()?;if data_dir.trim().is_empty() {return None;}@@ -270,7 +272,7 @@ pub fn startup_banner(version: &str, pid: u32, portable: bool, data_dir: Option<let dir = data_dir.map(|d| d.display().to_string()).unwrap_or_else(|| "<unresolved>".to_string());- format!("OmniGet {version} starting — pid {pid}, {modo} mode, data dir {dir}")+ format!("LibreGet {version} starting — pid {pid}, {modo} mode, data dir {dir}")}#[cfg(test)]@@ -280,7 +282,7 @@ mod banner_tests {#[test]fn banner_nomeia_o_modo_e_o_diretorio() {let b = startup_banner("0.7.7", 1234, true, Some(Path::new("/pendrive/data")));- assert!(b.contains("0.7.7"));+ assert!(b.contains("LibreGet 0.7.7"));assert!(b.contains("pid 1234"));assert!(b.contains("portable mode"));assert!(b.contains("/pendrive/data"));diff --git a/src-tauri/src/core/rpc.rs b/src-tauri/src/core/rpc.rsindex 4158570c..ad530240 100644--- a/src-tauri/src/core/rpc.rs+++ b/src-tauri/src/core/rpc.rs@@ -9,8 +9,8 @@ use serde_json::{json, Value};pub use libreget_core::models::settings::RpcSettings;const GITHUB_BUTTON_LABEL: &str = "View on GitHub";-const GITHUB_BUTTON_URL: &str = "https://github.com/OpenSelena/omniget";-const APP_LARGE_TEXT: &str = "omniget";+const GITHUB_BUTTON_URL: &str = "https://github.com/OpenSelena/libreget";+const APP_LARGE_TEXT: &str = "LibreGet";const SOURCE_PRIORITIES: &[&str] = &["focus", "music", "video", "course", "reading"];@@ -248,7 +248,7 @@ fn apply_top_activity(default_image: &str) -> bool {(details, state_text, a.source.clone(), img)}None => {- let details = "omniget".to_string();+ let details = "LibreGet".to_string();let state_text = idle_state_text(idle_stats);(details,@@ -314,7 +314,7 @@ pub async fn test_connection(settings: RpcSettings) -> Result<Value, String> {let assets = Assets::new().large_image(&img).large_text(APP_LARGE_TEXT);let buttons = vec![Button::new(GITHUB_BUTTON_LABEL, GITHUB_BUTTON_URL)];let activity = Activity::new()- .details("omniget")+ .details("LibreGet").state("Testing connection").assets(assets).buttons(buttons)diff --git a/src-tauri/src/core/state_file.rs b/src-tauri/src/core/state_file.rsindex 6a2721c2..791c726a 100644--- a/src-tauri/src/core/state_file.rs+++ b/src-tauri/src/core/state_file.rs@@ -108,7 +108,7 @@ mod tests {}fn tmp_dir(nome: &str) -> PathBuf {- let dir = std::env::temp_dir().join(format!("omniget-state-{}-{}", nome, now_ms()));+ let dir = std::env::temp_dir().join(format!("libreget-state-{}-{}", nome, now_ms()));std::fs::create_dir_all(&dir).unwrap();dir}diff --git a/src-tauri/src/platforms/bilibili/danmaku/burn.rs b/src-tauri/src/platforms/bilibili/danmaku/burn.rsindex 1bd59dab..06168ef3 100644--- a/src-tauri/src/platforms/bilibili/danmaku/burn.rs+++ b/src-tauri/src/platforms/bilibili/danmaku/burn.rs@@ -603,14 +603,14 @@ mod tests {/// Ponta a ponta com o FFmpeg gerido: gera um clipe, recorta e confere que/// o comentário aparece na hora certa (o quadro fica mais claro quando o/// texto branco entra em cena).- /// `cargo test -p omniget --lib -- --ignored live_danmaku_burn`+ /// `cargo test -p libreget --lib -- --ignored live_danmaku_burn`#[tokio::test]#[ignore]async fn live_danmaku_burn_keeps_the_timing() {let ffmpeg = libreget_core::core::dependencies::ensure_ffmpeg().await.unwrap();- let dir = std::env::temp_dir().join("omniget-danmaku-burn-live");+ let dir = std::env::temp_dir().join("libreget-danmaku-burn-live");std::fs::create_dir_all(&dir).unwrap();let src = dir.join("fonte.mp4");let gen = libreget_core::core::process::command(&ffmpeg)@@ -709,14 +709,14 @@ mod tests {}/// Mesmo clipe, agora mirando um tamanho de arquivo.- /// `cargo test -p omniget --lib -- --ignored live_danmaku_burn_target`+ /// `cargo test -p libreget --lib -- --ignored live_danmaku_burn_target`#[tokio::test]#[ignore]async fn live_danmaku_burn_hits_the_size_target() {let ffmpeg = libreget_core::core::dependencies::ensure_ffmpeg().await.unwrap();- let dir = std::env::temp_dir().join("omniget-danmaku-target-live");+ let dir = std::env::temp_dir().join("libreget-danmaku-target-live");std::fs::create_dir_all(&dir).unwrap();let src = dir.join("fonte.mp4");let gen = libreget_core::core::process::command(&ffmpeg)diff --git a/src-tauri/src/platforms/bilibili/danmaku/export.rs b/src-tauri/src/platforms/bilibili/danmaku/export.rsindex 02e4a226..c4365579 100644--- a/src-tauri/src/platforms/bilibili/danmaku/export.rs+++ b/src-tauri/src/platforms/bilibili/danmaku/export.rs@@ -426,11 +426,11 @@ mod tests {}/// Puxa um vídeo público de verdade e grava os três formatos.- /// `cargo test -p omniget --lib -- --ignored live_danmaku_export`+ /// `cargo test -p libreget --lib -- --ignored live_danmaku_export`#[tokio::test]#[ignore]async fn live_danmaku_export_writes_the_three_formats() {- let dir = std::env::temp_dir().join("omniget-danmaku-live");+ let dir = std::env::temp_dir().join("libreget-danmaku-live");let _ = std::fs::remove_dir_all(&dir);let opts = ExportOptions {url: "https://www.bilibili.com/video/BV1xx411c7mu".into(),diff --git a/src-tauri/src/platforms/generic_ytdlp/mod.rs b/src-tauri/src/platforms/generic_ytdlp/mod.rsindex bdc8e0f3..054c38c8 100644--- a/src-tauri/src/platforms/generic_ytdlp/mod.rs+++ b/src-tauri/src/platforms/generic_ytdlp/mod.rs@@ -1,2 +1,2 @@-// Re-export from omniget-core+// Re-export from libreget-corepub use libreget_core::platforms::generic_ytdlp::{is_direct_media_url, GenericYtdlpDownloader};diff --git a/src-tauri/src/platforms/magnet/mod.rs b/src-tauri/src/platforms/magnet/mod.rsindex cfae69c3..189d1057 100644--- a/src-tauri/src/platforms/magnet/mod.rs+++ b/src-tauri/src/platforms/magnet/mod.rs@@ -482,9 +482,9 @@ mod tests {#[test]fn bare_filename_resolves_through_search_dirs() {- let tmp = std::env::temp_dir().join(format!("omniget-magnet-{}", std::process::id()));+ let tmp = std::env::temp_dir().join(format!("libreget-magnet-{}", std::process::id()));std::fs::create_dir_all(&tmp).unwrap();- let file = tmp.join("OmniGetTest.torrent");+ let file = tmp.join("LibreGetTest.torrent");std::fs::write(&file, b"d4:infod4:name4:teste").unwrap();// an absolute or relative path that exists is used as given@@ -494,21 +494,21 @@ mod tests {);// a bare filename is found in the output folderassert_eq!(- resolve_torrent_file("OmniGetTest.torrent", &tmp),+ resolve_torrent_file("LibreGetTest.torrent", &tmp),Some(file.clone()));// a missing filename stays a local-path input so the caller can report it- assert!(looks_like_torrent_path("omniget-missing-xyz.torrent"));+ assert!(looks_like_torrent_path("libreget-missing-xyz.torrent"));assert_eq!(- resolve_torrent_file("omniget-missing-xyz.torrent", &tmp),+ resolve_torrent_file("libreget-missing-xyz.torrent", &tmp),None);// URIs are never resolved as filesassert_eq!(resolve_torrent_file("magnet:?xt=urn:btih:abc", &tmp), None);assert_eq!(- resolve_torrent_file("https://example.com/OmniGetTest.torrent", &tmp),+ resolve_torrent_file("https://example.com/LibreGetTest.torrent", &tmp),None);