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): hard-purge legacy omniget fallbacks in db, lifecycle, p2p, vimeo, pdf, and auth
IGECTa0c8401f8333
diff --git a/src-tauri/libreget-core/src/core/tools/icon_pack.rs b/src-tauri/libreget-core/src/core/tools/icon_pack.rsindex e40b3f81..2a80ba89 100644--- a/src-tauri/libreget-core/src/core/tools/icon_pack.rs+++ b/src-tauri/libreget-core/src/core/tools/icon_pack.rs@@ -284,7 +284,6 @@ mod tests {#[ignore]fn live_icon_pack_from_a_real_image() {let input = std::env::var("LIBREGET_IMG")- .or_else(|_| std::env::var("OMNIGET_IMG")).expect("defina LIBREGET_IMG");let dir = std::env::temp_dir().join("libreget-icon-live");let _ = std::fs::remove_dir_all(&dir);diff --git a/src-tauri/libreget-core/src/core/tools/pdf_repair.rs b/src-tauri/libreget-core/src/core/tools/pdf_repair.rsindex bfdd47d0..c2697e6a 100644--- a/src-tauri/libreget-core/src/core/tools/pdf_repair.rs+++ b/src-tauri/libreget-core/src/core/tools/pdf_repair.rs@@ -693,7 +693,6 @@ trailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n9999\n%%EOF\n";#[ignore]fn live_rebuild_of_a_real_pdf() {let path = std::env::var("LIBREGET_PDF")- .or_else(|_| std::env::var("OMNIGET_PDF")).expect("defina LIBREGET_PDF");let original = std::fs::read(&path).unwrap();let mut broken = original.clone();diff --git a/src-tauri/libreget-core/src/core/tools/vimeo.rs b/src-tauri/libreget-core/src/core/tools/vimeo.rsindex 705f82eb..1c48ac2b 100644--- a/src-tauri/libreget-core/src/core/tools/vimeo.rs+++ b/src-tauri/libreget-core/src/core/tools/vimeo.rs@@ -30,7 +30,6 @@ const ID_SHOWCASE: &str = "vm-showcase";/// título sem ter que adivinhar a extensão.const MARK_FILE: &str = "LIBREGET_FILEPATH:";const MARK_META: &str = "LIBREGET_META:";-const LEGACY_MARK_META: &str = "OMNIGET_META:";/// Extensões que contam como "já baixado" na hora de retomar.const MEDIA_EXTS: &[&str] = &[@@ -804,7 +803,7 @@ async fn run_download(if !rest.is_empty() {file = Some(rest.to_string());}- } else if let Some(rest) = l.strip_prefix(MARK_META).or_else(|| l.strip_prefix(LEGACY_MARK_META)) {+ } else if let Some(rest) = l.strip_prefix(MARK_META) {let mut it = rest.splitn(2, '\t');let id = it.next().unwrap_or("").to_string();let title = it.next().unwrap_or("").to_string();diff --git a/src-tauri/libreget-core/src/platforms/p2p.rs b/src-tauri/libreget-core/src/platforms/p2p.rsindex e95eb700..b04d167c 100644--- a/src-tauri/libreget-core/src/platforms/p2p.rs+++ b/src-tauri/libreget-core/src/platforms/p2p.rs@@ -17,7 +17,6 @@ const CHUNK_SIZE: usize = 64 * 1024;fn relay_addr() -> anyhow::Result<String> {std::env::var("LIBREGET_RELAY")- .or_else(|_| std::env::var("OMNIGET_RELAY")).map_err(|_| anyhow!("P2P relay server not configured. Set LIBREGET_RELAY environment variable."))}diff --git a/src-tauri/libreget-plugin-sdk/src/manifest.rs b/src-tauri/libreget-plugin-sdk/src/manifest.rsindex 48b936ab..583e0728 100644--- a/src-tauri/libreget-plugin-sdk/src/manifest.rs+++ b/src-tauri/libreget-plugin-sdk/src/manifest.rs@@ -8,7 +8,7 @@ pub struct PluginManifest {pub version: String,pub description: String,pub author: String,- #[serde(default, alias = "min_omniget_version")]+ #[serde(default)]pub min_libreget_version: Option<String>,#[serde(default)]pub license: Option<String>,diff --git a/src-tauri/plugins/courses/src/platforms/mod.rs b/src-tauri/plugins/courses/src/platforms/mod.rsindex 1ba8c050..9bc2b1e9 100644--- a/src-tauri/plugins/courses/src/platforms/mod.rs+++ b/src-tauri/plugins/courses/src/platforms/mod.rs@@ -41,13 +41,6 @@ pub mod voompplay;pub fn session_file(filename: &str) -> anyhow::Result<std::path::PathBuf> {let data_dir = dirs::data_dir().ok_or_else(|| anyhow::anyhow!("Could not find app data directory"))?;let target = data_dir.join("libreget").join(filename);- if target.exists() {- return Ok(target);- }- let legacy = data_dir.join("omniget").join(filename);- if legacy.exists() {- return Ok(legacy);- }if let Some(parent) = target.parent() {let _ = std::fs::create_dir_all(parent);}diff --git a/src-tauri/plugins/courses/src/platforms/udemy/auth.rs b/src-tauri/plugins/courses/src/platforms/udemy/auth.rsindex 26769a9b..749333fe 100644--- a/src-tauri/plugins/courses/src/platforms/udemy/auth.rs+++ b/src-tauri/plugins/courses/src/platforms/udemy/auth.rs@@ -444,7 +444,7 @@ pub async fn authenticate(app: &tauri::AppHandle, email: &str) -> anyhow::Result#[cfg(not(windows))]{- if host == "libreget-udemy-cookie-extract.local" || host == "omniget-udemy-cookie-extract.local" {+ if host == "libreget-udemy-cookie-extract.local" {for (key, value) in url.query_pairs() {if key == "cookies" {*cookie_data_nav.lock().unwrap() = Some(value.to_string());diff --git a/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs b/src-tauri/plugins/telegram/src/platforms/telegram/auth.rsindex 65e2184a..fa6feedc 100644--- a/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs+++ b/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs@@ -50,16 +50,11 @@ impl TelegramState {pub fn session_file_path() -> anyhow::Result<PathBuf> {let data_dir = dirs::data_dir().ok_or_else(|| anyhow!("Cannot find app data directory"))?;- let new_path = data_dir.join("libreget").join("telegram.session");- let old_path = data_dir.join("omniget").join("telegram.session");- if !new_path.exists() && old_path.exists() {- Ok(old_path)- } else {- if let Some(parent) = new_path.parent() {- let _ = std::fs::create_dir_all(parent);- }- Ok(new_path)+ let path = data_dir.join("libreget").join("telegram.session");+ if let Some(parent) = path.parent() {+ let _ = std::fs::create_dir_all(parent);}+ Ok(path)}pub async fn disconnect_and_clear_client(handle: &TelegramSessionHandle) {diff --git a/src-tauri/src/commands/app_lifecycle.rs b/src-tauri/src/commands/app_lifecycle.rsindex 04cdac8c..bd6a5234 100644--- a/src-tauri/src/commands/app_lifecycle.rs+++ b/src-tauri/src/commands/app_lifecycle.rs@@ -48,9 +48,7 @@ pub fn get_portable_info() -> PortableInfo {PortableInfo {is_portable,- data_dir: std::env::var("LIBREGET_DATA_DIR")- .or_else(|_| std::env::var("OMNIGET_DATA_DIR"))- .ok(),+ data_dir: std::env::var("LIBREGET_DATA_DIR").ok(),macos_webview_notice: cfg!(target_os = "macos") && is_portable,}}diff --git a/src-tauri/src/core/db.rs b/src-tauri/src/core/db.rsindex 0b8c4ef6..beb95875 100644--- a/src-tauri/src/core/db.rs+++ b/src-tauri/src/core/db.rs@@ -4,16 +4,10 @@ use std::sync::{Mutex, OnceLock};use rusqlite::Connection;const DB_FILE: &str = "libreget.db";-const LEGACY_DB_FILE: &str = "omniget.db";fn db_path() -> Option<PathBuf> {let dir = crate::core::paths::app_data_dir()?;- let new_path = dir.join(DB_FILE);- let legacy_path = dir.join(LEGACY_DB_FILE);- if !new_path.exists() && legacy_path.exists() {- let _ = std::fs::rename(&legacy_path, &new_path);- }- Some(new_path)+ Some(dir.join(DB_FILE))}fn open() -> Option<Connection> {diff --git a/src-tauri/src/extension_storage.rs b/src-tauri/src/extension_storage.rsindex 96412cde..550b1828 100644--- a/src-tauri/src/extension_storage.rs+++ b/src-tauri/src/extension_storage.rs@@ -344,7 +344,7 @@ pub fn read_extension_metadata(url: &str) -> Option<ExtensionMetadata> {/// Best-effort removal of the native-messaging artefacts left behind by the/// pre-0.5.3 builds: the Chrome / Firefox host manifests and the copied-/// `omniget-native-host` binary that lived under `chrome-native-host/`.+/// native host binary that lived under `chrome-native-host/`.////// We can't unregister the manifest atomically across all browsers — the/// best we can do is delete the files and let Chrome / Firefox skip themdiff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rsindex 210e9f32..42306ff2 100644--- a/src-tauri/src/main.rs+++ b/src-tauri/src/main.rs@@ -8,7 +8,6 @@ fn check_portable_mode() {let _ = std::fs::create_dir_all(&data_dir);std::env::set_var("LIBREGET_PORTABLE", "1");std::env::set_var("LIBREGET_DATA_DIR", data_dir.to_string_lossy().to_string());- std::env::set_var("OMNIGET_DATA_DIR", data_dir.to_string_lossy().to_string());#[cfg(windows)]if std::env::var("WEBVIEW2_USER_DATA_FOLDER").is_err() {diff --git a/src-tauri/src/platforms/p2p/mod.rs b/src-tauri/src/platforms/p2p/mod.rsindex 2c5c0535..7a7061d9 100644--- a/src-tauri/src/platforms/p2p/mod.rs+++ b/src-tauri/src/platforms/p2p/mod.rs@@ -19,7 +19,6 @@ const CHUNK_SIZE: usize = 64 * 1024;fn relay_addr() -> anyhow::Result<String> {std::env::var("LIBREGET_RELAY")- .or_else(|_| std::env::var("OMNIGET_RELAY")).map_err(|_| anyhow!("P2P relay server not configured. Set LIBREGET_RELAY environment variable."))}