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.

fix(rebrand): purge remaining omniget in core tools, tray, local bridge, and mcp

IGECT57c6bfda3cfb
diff --git a/src-tauri/libreget-core/src/core/ai.rs b/src-tauri/libreget-core/src/core/ai.rs
index ebd31132..46514fae 100644
--- a/src-tauri/libreget-core/src/core/ai.rs
+++ b/src-tauri/libreget-core/src/core/ai.rs
@@ -676,7 +676,7 @@ mod tests {
fn the_store_keeps_the_credential_where_it_belongs() {
// Passa pelo mesmo caminho da tela de IA (store + arquivo), só que numa
// pasta temporária: é o teste que pega troca de provedor vazando a chave.
- let dir = std::env::temp_dir().join(format!("omniget-ai-{}", std::process::id()));
+ let dir = std::env::temp_dir().join(format!("libreget-ai-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
TEST_DIR.with(|d| *d.borrow_mut() = Some(dir.clone()));
diff --git a/src-tauri/libreget-core/src/core/binary_overrides.rs b/src-tauri/libreget-core/src/core/binary_overrides.rs
index a9a553a0..1316efee 100644
--- a/src-tauri/libreget-core/src/core/binary_overrides.rs
+++ b/src-tauri/libreget-core/src/core/binary_overrides.rs
@@ -1,4 +1,4 @@
-//! Binarios que o usuario apontou, em vez dos que o OmniGet gerencia.
+//! Binarios que o usuario apontou, em vez dos que o LibreGet gerencia.
//!
//! Pedido na issue #222: quem ja tem yt-dlp, FFmpeg ou PDFium instalado nao
//! quer uma segunda copia dentro do diretorio do app. Ate aqui so o PDFium
@@ -6,7 +6,7 @@
//! metade do problema e cria a outra metade, porque a copia envelhece sozinha.
//!
//! Aqui o caminho e guardado e usado no lugar. Se o usuario atualizar o yt-dlp
-//! dele pelo gerenciador de pacotes, o OmniGet passa a usar a versao nova sem
+//! dele pelo gerenciador de pacotes, o LibreGet passa a usar a versao nova sem
//! fazer nada.
//!
//! O arquivo proprio, e nao um campo no `settings.json`, por dois motivos: nao
@@ -136,7 +136,7 @@ mod tests {
use super::*;
fn tempfile(tag: &str) -> PathBuf {
- let p = std::env::temp_dir().join(format!("omniget-ovr-{tag}-{}", std::process::id()));
+ let p = std::env::temp_dir().join(format!("libreget-ovr-{tag}-{}", std::process::id()));
std::fs::write(&p, b"stub").expect("cria arquivo");
p
}
diff --git a/src-tauri/libreget-core/src/core/direct_downloader.rs b/src-tauri/libreget-core/src/core/direct_downloader.rs
index c6b2aaad..f01c74a2 100644
--- a/src-tauri/libreget-core/src/core/direct_downloader.rs
+++ b/src-tauri/libreget-core/src/core/direct_downloader.rs
@@ -814,7 +814,7 @@ mod tests {
fn temp_file(name: &str, bytes: &[u8]) -> PathBuf {
let dir = std::env::temp_dir().join(format!(
- "omniget-direct-test-{}-{}",
+ "libreget-direct-test-{}-{}",
std::process::id(),
name
));
diff --git a/src-tauri/libreget-core/src/core/extension_manifest.rs b/src-tauri/libreget-core/src/core/extension_manifest.rs
index 5abe6316..8831c128 100644
--- a/src-tauri/libreget-core/src/core/extension_manifest.rs
+++ b/src-tauri/libreget-core/src/core/extension_manifest.rs
@@ -10,7 +10,7 @@
//!
//! The plumbing follows the same shape as the extension cookie jar
//! (`cookie_parser::load_extension_cookies_for_url`): the app side writes an
-//! artefact into `app_data_dir()` and `omniget-core` picks it up on its own
+//! artefact into `app_data_dir()` and `libreget-core` picks it up on its own
//! when the download actually starts. That keeps the playlist text out of
//! `DownloadOptions` and out of the already very wide `queue::enqueue`
//! signature.
@@ -173,7 +173,7 @@ mod tests {
.as_nanos();
let seq = COUNTER.fetch_add(1, Ordering::Relaxed);
let dir = std::env::temp_dir().join(format!(
- "omniget-manifest-{}-{}-{}-{}",
+ "libreget-manifest-{}-{}-{}-{}",
tag,
std::process::id(),
nanos,
diff --git a/src-tauri/libreget-core/src/core/ffmpeg.rs b/src-tauri/libreget-core/src/core/ffmpeg.rs
index 2b7fa982..4ef4107f 100644
--- a/src-tauri/libreget-core/src/core/ffmpeg.rs
+++ b/src-tauri/libreget-core/src/core/ffmpeg.rs
@@ -446,7 +446,7 @@ pub async fn embed_metadata(
let temp_dir = file.parent().unwrap_or(Path::new("."));
let ext = file.extension().and_then(|e| e.to_str()).unwrap_or("mp4");
- let temp_output = temp_dir.join(format!(".omniget_meta_{}.{}", uuid::Uuid::new_v4(), ext));
+ let temp_output = temp_dir.join(format!(".libreget_meta_{}.{}", uuid::Uuid::new_v4(), ext));
let is_audio_only = matches!(
ext.to_lowercase().as_str(),
@@ -596,11 +596,11 @@ async fn download_thumbnail(
"jpg"
};
- let thumb_path = dest_dir.join(format!(".omniget_thumb_{}.{}", uuid::Uuid::new_v4(), ext));
+ let thumb_path = dest_dir.join(format!(".libreget_thumb_{}.{}", uuid::Uuid::new_v4(), ext));
std::fs::write(&thumb_path, &bytes)?;
if ext == "png" {
- let jpg_path = dest_dir.join(format!(".omniget_thumb_{}.jpg", uuid::Uuid::new_v4()));
+ let jpg_path = dest_dir.join(format!(".libreget_thumb_{}.jpg", uuid::Uuid::new_v4()));
let convert_result = crate::core::process::command("ffmpeg")
.args([
"-y",
diff --git a/src-tauri/libreget-core/src/core/filename.rs b/src-tauri/libreget-core/src/core/filename.rs
index 081b92d0..6425020c 100644
--- a/src-tauri/libreget-core/src/core/filename.rs
+++ b/src-tauri/libreget-core/src/core/filename.rs
@@ -84,26 +84,26 @@ mod tests {
}
#[test]
- fn omniget_prefix_basic() {
- let name = "omniget-My Video Title [abc123]";
+ fn libreget_prefix_basic() {
+ let name = "libreget-My Video Title [abc123]";
let result = sanitize_path_component(name);
- assert!(result.starts_with("omniget-"));
+ assert!(result.starts_with("libreget-"));
assert!(!result.contains(':'));
}
#[test]
- fn omniget_prefix_with_special_chars() {
- let name = "omniget-Video: \"Best\" <2024> [id]";
+ fn libreget_prefix_with_special_chars() {
+ let name = "libreget-Video: \"Best\" <2024> [id]";
let result = sanitize_path_component(name);
- assert!(result.starts_with("omniget-"));
+ assert!(result.starts_with("libreget-"));
}
#[test]
- fn omniget_prefix_long_name() {
+ fn libreget_prefix_long_name() {
let long_title = "a".repeat(250);
- let name = format!("omniget-{} [id]", long_title);
+ let name = format!("libreget-{} [id]", long_title);
let result = sanitize_path_component(&name);
- assert!(result.starts_with("omniget-"));
+ assert!(result.starts_with("libreget-"));
assert!(result.ends_with("[id]"));
}
}
diff --git a/src-tauri/libreget-core/src/core/http_fetcher.rs b/src-tauri/libreget-core/src/core/http_fetcher.rs
index 1ec63546..2ad3b3c7 100644
--- a/src-tauri/libreget-core/src/core/http_fetcher.rs
+++ b/src-tauri/libreget-core/src/core/http_fetcher.rs
@@ -1341,7 +1341,7 @@ mod tests {
async fn fetcher_downloads_small_file_streaming() {
use std::io::Write;
let temp_dir =
- std::env::temp_dir().join(format!("omniget_http_fetcher_test_{}", now_unix_nanos()));
+ std::env::temp_dir().join(format!("libreget_http_fetcher_test_{}", now_unix_nanos()));
std::fs::create_dir_all(&temp_dir).unwrap();
let payload: Vec<u8> = (0u8..=255).cycle().take(200_000).collect();
@@ -1465,7 +1465,7 @@ mod tests {
#[tokio::test]
async fn fetcher_downloads_multi_segment_with_range() {
let temp_dir =
- std::env::temp_dir().join(format!("omniget_http_fetcher_chunked_{}", now_unix_nanos()));
+ std::env::temp_dir().join(format!("libreget_http_fetcher_chunked_{}", now_unix_nanos()));
std::fs::create_dir_all(&temp_dir).unwrap();
let payload: Vec<u8> = (0u8..=255).cycle().take(2 * 1024 * 1024).collect();
@@ -1522,7 +1522,7 @@ mod tests {
#[tokio::test]
async fn fetcher_resumes_from_sidecar_state() {
let temp_dir = std::env::temp_dir().join(format!(
- "omniget_http_fetcher_resume_load_{}",
+ "libreget_http_fetcher_resume_load_{}",
now_unix_nanos()
));
std::fs::create_dir_all(&temp_dir).unwrap();
@@ -1583,7 +1583,7 @@ mod tests {
#[tokio::test]
async fn fetcher_resume_sidecar_round_trip() {
let temp_dir =
- std::env::temp_dir().join(format!("omniget_http_fetcher_resume_{}", now_unix_nanos()));
+ std::env::temp_dir().join(format!("libreget_http_fetcher_resume_{}", now_unix_nanos()));
std::fs::create_dir_all(&temp_dir).unwrap();
let path = temp_dir.join("video.mp4.part.resume.json");
let state = ResumeState {
diff --git a/src-tauri/libreget-core/src/core/onnxrt.rs b/src-tauri/libreget-core/src/core/onnxrt.rs
index a96cdc5c..d02ddc57 100644
--- a/src-tauri/libreget-core/src/core/onnxrt.rs
+++ b/src-tauri/libreget-core/src/core/onnxrt.rs
@@ -1,7 +1,7 @@
//! ONNX Runtime como binário gerido, no mesmo padrão do PDFium.
//!
//! O crate `ort` está com a feature `load-dynamic`: nada de nativo entra no
-//! build do OmniGet. A biblioteca do ONNX Runtime (`libonnxruntime.dylib`,
+//! build do LibreGet. A biblioteca do ONNX Runtime (`libonnxruntime.dylib`,
//! `onnxruntime.dll`, `libonnxruntime.so`) é baixada sob demanda dos releases
//! oficiais do `microsoft/onnxruntime` e guardada no diretório de dados do app.
//! Quem não quiser baixar aponta um arquivo que já tem — igual ao PDFium.
@@ -185,7 +185,7 @@ pub fn version_marker_path() -> Option<PathBuf> {
}
/// A lib em uso e de onde ela veio: `"env"` quando o usuário apontou
-/// `ORT_DYLIB_PATH`, `"managed"` quando é a que o OmniGet baixou.
+/// `ORT_DYLIB_PATH`, `"managed"` quando é a que o LibreGet baixou.
pub fn resolve_with_source() -> Option<(PathBuf, &'static str)> {
if let Ok(raw) = std::env::var("ORT_DYLIB_PATH") {
let p = PathBuf::from(raw.trim());
@@ -287,7 +287,7 @@ pub fn init() -> anyhow::Result<PathBuf> {
let path = resolve_path().ok_or_else(missing_runtime_error)?;
ort::init_from(&path)
.map_err(|e| anyhow!("não consegui carregar {}: {}", path.display(), e))?
- .with_name("omniget")
+ .with_name("libreget")
.commit();
let _ = READY.set(path.clone());
Ok(path)
diff --git a/src-tauri/libreget-core/src/core/pdfium.rs b/src-tauri/libreget-core/src/core/pdfium.rs
index 54135dbf..18ba646c 100644
--- a/src-tauri/libreget-core/src/core/pdfium.rs
+++ b/src-tauri/libreget-core/src/core/pdfium.rs
@@ -115,7 +115,7 @@ pub fn pdfium_version_marker_path() -> Option<PathBuf> {
}
/// The PDFium library actually in use, and where it came from: `"custom"` for
-/// a file the user pointed at, `"managed"` for the one OmniGet downloaded.
+/// a file the user pointed at, `"managed"` for the one LibreGet downloaded.
///
/// Issue #222: yt-dlp and FFmpeg have honoured the user's own binary since
/// the feature shipped, through `find_tool_with_source`. PDFium never did —
diff --git a/src-tauri/libreget-core/src/core/process.rs b/src-tauri/libreget-core/src/core/process.rs
index 10a1f09e..376a5369 100644
--- a/src-tauri/libreget-core/src/core/process.rs
+++ b/src-tauri/libreget-core/src/core/process.rs
@@ -106,8 +106,8 @@ mod tests {
#[test]
fn cleans_appdir_from_ld_library_path() {
- let appdir = "/tmp/.mount_omniget123";
- let ld = "/tmp/.mount_omniget123/usr/lib:/tmp/.mount_omniget123/usr/lib64:/usr/lib64";
+ let appdir = "/tmp/.mount_libreget123";
+ let ld = "/tmp/.mount_libreget123/usr/lib:/tmp/.mount_libreget123/usr/lib64:/usr/lib64";
assert_eq!(
clean_ld_library_path(appdir, ld),
Some("/usr/lib64".to_string())
@@ -116,14 +116,14 @@ mod tests {
#[test]
fn removes_ld_library_path_when_only_appdir_paths_present() {
- let appdir = "/tmp/.mount_omniget123/";
- let ld = "/tmp/.mount_omniget123/usr/lib:/tmp/.mount_omniget123/usr/lib64";
+ let appdir = "/tmp/.mount_libreget123/";
+ let ld = "/tmp/.mount_libreget123/usr/lib:/tmp/.mount_libreget123/usr/lib64";
assert_eq!(clean_ld_library_path(appdir, ld), None);
}
#[test]
fn preserves_custom_user_ld_paths() {
- let appdir = "/tmp/.mount_omniget123";
+ let appdir = "/tmp/.mount_libreget123";
let ld = "/opt/cuda/lib64:/usr/local/lib";
assert_eq!(
clean_ld_library_path(appdir, ld),
@@ -133,7 +133,7 @@ mod tests {
#[test]
fn handles_empty_or_whitespace_ld_path() {
- let appdir = "/tmp/.mount_omniget123";
+ let appdir = "/tmp/.mount_libreget123";
assert_eq!(clean_ld_library_path(appdir, ""), None);
assert_eq!(clean_ld_library_path(appdir, " : : "), None);
}
diff --git a/src-tauri/libreget-core/src/core/spicetify.rs b/src-tauri/libreget-core/src/core/spicetify.rs
index 70c9105a..ab0451b6 100644
--- a/src-tauri/libreget-core/src/core/spicetify.rs
+++ b/src-tauri/libreget-core/src/core/spicetify.rs
@@ -1,6 +1,6 @@
//! Spicetify: personalização do cliente oficial do Spotify.
//!
-//! O OmniGet não reimplementa o Spicetify; ele baixa o binário oficial do
+//! O LibreGet não reimplementa o Spicetify; ele baixa o binário oficial do
//! release do GitHub (hash conferido) e o chama. A pasta de config é a
//! padrão do Spicetify (`~/.config/spicetify`, `%APPDATA%\spicetify`), de
//! propósito: quem já usa o CLI no terminal vê o mesmo estado aqui, e o
@@ -349,7 +349,7 @@ pub async fn status() -> SpicetifyStatus {
fn github_client() -> anyhow::Result<reqwest::Client> {
use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, USER_AGENT};
let mut headers = HeaderMap::new();
- headers.insert(USER_AGENT, HeaderValue::from_static("OmniGet"));
+ headers.insert(USER_AGENT, HeaderValue::from_static("LibreGet"));
headers.insert(
ACCEPT,
HeaderValue::from_static("application/vnd.github+json"),
@@ -642,7 +642,7 @@ mod tests {
#[test]
fn ini_le_listas_e_secoes() {
let text = "[Setting]\ncurrent_theme = Dribbblish\ncolor_scheme = dark\n\n[AdditionalOptions]\nextensions = a.js|b.js\ncustom_apps = marketplace\n[Backup]\nversion = 1.2.3\n";
- let dir = std::env::temp_dir().join(format!("omniget-spicetify-{}", std::process::id()));
+ let dir = std::env::temp_dir().join(format!("libreget-spicetify-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("config-xpui.ini");
std::fs::write(&path, text).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/ai_keys.rs b/src-tauri/libreget-core/src/core/tools/ai_keys.rs
index 230469ef..376b8b86 100644
--- a/src-tauri/libreget-core/src/core/tools/ai_keys.rs
+++ b/src-tauri/libreget-core/src/core/tools/ai_keys.rs
@@ -686,7 +686,7 @@ pub fn export(format: &str, ids: &[String]) -> anyhow::Result<String> {
})
}
-/// Usa esta chave como a IA do OmniGet (Ajustes → IA).
+/// Usa esta chave como a IA do LibreGet (Ajustes → IA).
pub fn use_in_app(id: &str) -> anyhow::Result<()> {
let e = get(id)?;
use crate::core::ai::{self, KeyAction};
diff --git a/src-tauri/libreget-core/src/core/tools/audio_clean.rs b/src-tauri/libreget-core/src/core/tools/audio_clean.rs
index 174a8c79..52c0cee3 100644
--- a/src-tauri/libreget-core/src/core/tools/audio_clean.rs
+++ b/src-tauri/libreget-core/src/core/tools/audio_clean.rs
@@ -378,12 +378,12 @@ mod tests {
}
/// Mede e normaliza um tom baixo de verdade, e limpa ruído branco.
- /// `cargo test -p omniget-core --lib -- --ignored live_audio`
+ /// `cargo test -p libreget-core --lib -- --ignored live_audio`
#[tokio::test]
#[ignore]
async fn live_audio_normalizes_and_denoises() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await.unwrap();
- let dir = std::env::temp_dir().join("omniget-audio-live");
+ let dir = std::env::temp_dir().join("libreget-audio-live");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("baixo.wav");
let gen = crate::core::process::command(&ffmpeg)
diff --git a/src-tauri/libreget-core/src/core/tools/audio_tag.rs b/src-tauri/libreget-core/src/core/tools/audio_tag.rs
index 19d48749..72f73598 100644
--- a/src-tauri/libreget-core/src/core/tools/audio_tag.rs
+++ b/src-tauri/libreget-core/src/core/tools/audio_tag.rs
@@ -1428,7 +1428,7 @@ mod tests {
fn temp_dir(name: &str) -> PathBuf {
let dir =
- std::env::temp_dir().join(format!("omniget-audio-tag-{name}-{}", std::process::id()));
+ std::env::temp_dir().join(format!("libreget-audio-tag-{name}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).expect("criar tempdir do teste");
dir
diff --git a/src-tauri/libreget-core/src/core/tools/autoclick.rs b/src-tauri/libreget-core/src/core/tools/autoclick.rs
index 7eb1f23a..5a39b131 100644
--- a/src-tauri/libreget-core/src/core/tools/autoclick.rs
+++ b/src-tauri/libreget-core/src/core/tools/autoclick.rs
@@ -2,7 +2,7 @@
//! timer de alta resolução (sleep grosso + espera ativa no último
//! milissegundo), CPS fixo ou em faixa aleatória, botão, clique duplo, limite
//! por cliques ou tempo e posição fixa. Multiplataforma via `enigo`; no macOS
-//! exige a permissão de Acessibilidade para o OmniGet, no Wayland o clique
+//! exige a permissão de Acessibilidade para o LibreGet, no Wayland o clique
//! sintético é limitado. O atalho global fica no app (hotkey.rs).
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
@@ -112,7 +112,7 @@ pub fn start(opts: ClickOptions) -> anyhow::Result<()> {
*STARTED.lock().unwrap_or_else(|e| e.into_inner()) = Some(Instant::now());
std::thread::Builder::new()
- .name("omniget-autoclick".into())
+ .name("libreget-autoclick".into())
.spawn(move || {
let mut enigo = match Enigo::new(&Settings::default()) {
Ok(e) => e,
diff --git a/src-tauri/libreget-core/src/core/tools/ctf/encoding.rs b/src-tauri/libreget-core/src/core/tools/ctf/encoding.rs
index e8cedea0..f0078e9f 100644
--- a/src-tauri/libreget-core/src/core/tools/ctf/encoding.rs
+++ b/src-tauri/libreget-core/src/core/tools/ctf/encoding.rs
@@ -318,7 +318,7 @@ mod tests {
for f in [
"base64", "base32", "hex", "url", "html", "binary", "decimal",
] {
- assert_eq!(round(f, "OmniGet 2026!"), "OmniGet 2026!", "formato {}", f);
+ assert_eq!(round(f, "LibreGet 2026!"), "LibreGet 2026!", "formato {}", f);
}
}
diff --git a/src-tauri/libreget-core/src/core/tools/ctf/magic.rs b/src-tauri/libreget-core/src/core/tools/ctf/magic.rs
index 049c78c7..8d03ef3d 100644
--- a/src-tauri/libreget-core/src/core/tools/ctf/magic.rs
+++ b/src-tauri/libreget-core/src/core/tools/ctf/magic.rs
@@ -315,9 +315,9 @@ mod tests {
#[test]
fn strings_finds_readable_runs() {
- let data = b"\x00\x01FLAG{isso_aqui}\x00\xFFab\x00OmniGet";
+ let data = b"\x00\x01FLAG{isso_aqui}\x00\xFFab\x00LibreGet";
let s = strings(data, 4, 10);
- assert_eq!(s, vec!["FLAG{isso_aqui}", "OmniGet"]);
+ assert_eq!(s, vec!["FLAG{isso_aqui}", "LibreGet"]);
// "ab" tem 2 caracteres e fica de fora.
assert!(!s.iter().any(|x| x == "ab"));
}
diff --git a/src-tauri/libreget-core/src/core/tools/disk.rs b/src-tauri/libreget-core/src/core/tools/disk.rs
index 37062d72..e6608b07 100644
--- a/src-tauri/libreget-core/src/core/tools/disk.rs
+++ b/src-tauri/libreget-core/src/core/tools/disk.rs
@@ -321,7 +321,7 @@ mod tests {
#[test]
fn tree() {
- let dir = std::env::temp_dir().join(format!("omniget-disk-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-disk-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(dir.join("a/b")).unwrap();
std::fs::write(dir.join("a/x.bin"), vec![0u8; 300]).unwrap();
std::fs::write(dir.join("a/b/y.bin"), vec![0u8; 200]).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/dupes.rs b/src-tauri/libreget-core/src/core/tools/dupes.rs
index 7ff9e00d..660cf251 100644
--- a/src-tauri/libreget-core/src/core/tools/dupes.rs
+++ b/src-tauri/libreget-core/src/core/tools/dupes.rs
@@ -187,7 +187,7 @@ mod tests {
#[test]
fn finds_identical_files() {
- let dir = std::env::temp_dir().join(format!("omniget-dupes-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-dupes-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(dir.join("sub")).unwrap();
let big = vec![7u8; 70 * 1024];
std::fs::write(dir.join("a.bin"), &big).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/exif.rs b/src-tauri/libreget-core/src/core/tools/exif.rs
index 8197c5d5..e48c636d 100644
--- a/src-tauri/libreget-core/src/core/tools/exif.rs
+++ b/src-tauri/libreget-core/src/core/tools/exif.rs
@@ -562,7 +562,7 @@ mod tests {
#[test]
fn reads_gps_and_camera_then_strips_them() {
- let dir = std::env::temp_dir().join("omniget-exif-test");
+ let dir = std::env::temp_dir().join("libreget-exif-test");
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("com-gps.jpg");
std::fs::write(&path, jpeg_with_gps()).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/games/protondb.rs b/src-tauri/libreget-core/src/core/tools/games/protondb.rs
index ea07bf53..dd6afb86 100644
--- a/src-tauri/libreget-core/src/core/tools/games/protondb.rs
+++ b/src-tauri/libreget-core/src/core/tools/games/protondb.rs
@@ -524,7 +524,7 @@ mod tests {
}
/// Bate na API de verdade com o appid 570 (Dota 2) e confere o formato.
- /// `cargo test -p omniget-core --lib -- --ignored live_protondb`
+ /// `cargo test -p libreget-core --lib -- --ignored live_protondb`
#[tokio::test]
#[ignore]
async fn live_protondb_answers_in_the_expected_shape() {
diff --git a/src-tauri/libreget-core/src/core/tools/github.rs b/src-tauri/libreget-core/src/core/tools/github.rs
index 362b9a28..b47656ea 100644
--- a/src-tauri/libreget-core/src/core/tools/github.rs
+++ b/src-tauri/libreget-core/src/core/tools/github.rs
@@ -12,7 +12,7 @@ use crate::core::dependencies::integrity;
pub fn client() -> anyhow::Result<reqwest::Client> {
use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, USER_AGENT};
let mut headers = HeaderMap::new();
- headers.insert(USER_AGENT, HeaderValue::from_static("OmniGet"));
+ headers.insert(USER_AGENT, HeaderValue::from_static("LibreGet"));
headers.insert(
ACCEPT,
HeaderValue::from_static("application/vnd.github+json"),
diff --git a/src-tauri/libreget-core/src/core/tools/hosts_block.rs b/src-tauri/libreget-core/src/core/tools/hosts_block.rs
index f92ade9e..0f9787b6 100644
--- a/src-tauri/libreget-core/src/core/tools/hosts_block.rs
+++ b/src-tauri/libreget-core/src/core/tools/hosts_block.rs
@@ -5,7 +5,7 @@
//! `0.0.0.0` mata a conexão na origem.
//!
//! A regra dura deste módulo é **nunca tocar em nada fora do bloco**. Tudo
-//! que o OmniGet escreve vive entre dois marcadores; o texto antes e depois
+//! que o LibreGet escreve vive entre dois marcadores; o texto antes e depois
//! deles é preservado byte a byte. Escrever no `hosts` exige admin/root: se
//! não der, o módulo não tenta escalar privilégio — ele grava a versão
//! pronta num arquivo de teste e devolve o comando exato para o usuário
@@ -16,8 +16,10 @@ use std::path::{Path, PathBuf};
use anyhow::anyhow;
use serde::{Deserialize, Serialize};
-pub const BEGIN: &str = "# >>> OmniGet block list >>>";
-pub const END: &str = "# <<< OmniGet block list <<<";
+pub const BEGIN: &str = "# >>> LibreGet block list >>>";
+pub const END: &str = "# <<< LibreGet block list <<<";
+pub const LEGACY_BEGIN: &str = "# >>> OmniGet block list >>>";
+pub const LEGACY_END: &str = "# <<< OmniGet block list <<<";
const ID: &str = "sys-hosts";
@@ -93,7 +95,7 @@ pub fn is_writable(path: &Path) -> bool {
pub fn permission_hint(staging: &Path, target: &Path) -> String {
if cfg!(windows) {
format!(
- "Abra o OmniGet como administrador, ou rode num Prompt elevado: copy /Y \"{}\" \"{}\"",
+ "Abra o LibreGet como administrador, ou rode num Prompt elevado: copy /Y \"{}\" \"{}\"",
staging.display(),
target.display()
)
@@ -231,10 +233,10 @@ fn block_span(text: &str) -> Option<(usize, usize)> {
for line in text.split_inclusive('\n') {
let trimmed = line.trim_end_matches(['\r', '\n']).trim();
if begin.is_none() {
- if trimmed == BEGIN {
+ if trimmed == BEGIN || trimmed == LEGACY_BEGIN {
begin = Some(idx);
}
- } else if trimmed == END {
+ } else if trimmed == END || trimmed == LEGACY_END {
return Some((begin?, idx + line.len()));
}
idx += line.len();
@@ -252,10 +254,13 @@ pub fn block_body(text: &str) -> Option<&str> {
let inner = &text[start..end];
let after_begin = inner.find('\n').map_or_else(|| inner.len(), |i| i + 1);
let body = &inner[after_begin..];
- let before_end = body.rfind(END).map_or_else(
- || body.len(),
- |i| body[..i].rfind('\n').map_or(0, |j| j + 1),
- );
+ let before_end = body
+ .rfind(END)
+ .or_else(|| body.rfind(LEGACY_END))
+ .map_or_else(
+ || body.len(),
+ |i| body[..i].rfind('\n').map_or(0, |j| j + 1),
+ );
Some(&body[..before_end])
}
@@ -284,7 +289,7 @@ pub fn render_block(domains: &[String], ip: &str, updated_at: &str, nl: &str) ->
let mut s = String::with_capacity(domains.len() * 32 + 256);
s.push_str(BEGIN);
s.push_str(nl);
- s.push_str("# gerado pelo OmniGet — não edite aqui dentro");
+ s.push_str("# gerado pelo LibreGet — não edite aqui dentro");
s.push_str(nl);
s.push_str(&format!("# atualizado em {}", updated_at));
s.push_str(nl);
@@ -362,7 +367,7 @@ pub struct HostsState {
pub bytes: u64,
/// Linhas fora do bloco (o que é do usuário), incluindo comentário.
pub user_lines: usize,
- /// Domínios dentro do bloco do OmniGet.
+ /// Domínios dentro do bloco do LibreGet.
pub blocked: usize,
pub block_present: bool,
pub updated_at: Option<String>,
@@ -660,7 +665,7 @@ pub async fn apply(
result.hint = staged.as_ref().map(|s| permission_hint(s, &path));
result.staged = staged.map(|s| s.to_string_lossy().to_string());
result.error = Some(if cfg!(windows) {
- "sem permissão para escrever no hosts: o OmniGet precisa estar aberto como administrador".into()
+ "sem permissão para escrever no hosts: o LibreGet precisa estar aberto como administrador".into()
} else {
"sem permissão para escrever no hosts: precisa de root".into()
});
@@ -776,7 +781,7 @@ mod tests {
/// num arquivo temporário próprio.
fn tempdir(tag: &str) -> PathBuf {
let d =
- std::env::temp_dir().join(format!("omniget-hosts-{}-{}", tag, uuid::Uuid::new_v4()));
+ std::env::temp_dir().join(format!("libreget-hosts-{}-{}", tag, uuid::Uuid::new_v4()));
std::fs::create_dir_all(&d).expect("criar tempdir de teste");
d
}
@@ -1035,7 +1040,7 @@ mod tests {
}
/// Baixa as listas de verdade e monta o bloco num arquivo temporário.
- /// `cargo test -p omniget-core --lib -- --ignored live_hosts`
+ /// `cargo test -p libreget-core --lib -- --ignored live_hosts`
#[tokio::test]
#[ignore]
async fn live_hosts_sources_download_and_merge() {
diff --git a/src-tauri/libreget-core/src/core/tools/icon_pack.rs b/src-tauri/libreget-core/src/core/tools/icon_pack.rs
index 69f95423..e40b3f81 100644
--- a/src-tauri/libreget-core/src/core/tools/icon_pack.rs
+++ b/src-tauri/libreget-core/src/core/tools/icon_pack.rs
@@ -279,12 +279,14 @@ mod tests {
/// Gera o pacote inteiro de uma imagem de verdade, para conferir os
/// arquivos com as ferramentas do sistema (`iconutil`, `sips`).
- /// `OMNIGET_IMG=/caminho/arte.png cargo test -p omniget-core --lib -- --ignored live_icon`
+ /// `LIBREGET_IMG=/caminho/arte.png cargo test -p libreget-core --lib -- --ignored live_icon`
#[test]
#[ignore]
fn live_icon_pack_from_a_real_image() {
- let input = std::env::var("OMNIGET_IMG").expect("defina OMNIGET_IMG");
- let dir = std::env::temp_dir().join("omniget-icon-live");
+ 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);
std::fs::create_dir_all(&dir).unwrap();
let opts = IconOptions {
diff --git a/src-tauri/libreget-core/src/core/tools/image_compress.rs b/src-tauri/libreget-core/src/core/tools/image_compress.rs
index 74bdb287..ddef7f1e 100644
--- a/src-tauri/libreget-core/src/core/tools/image_compress.rs
+++ b/src-tauri/libreget-core/src/core/tools/image_compress.rs
@@ -345,7 +345,7 @@ mod tests {
#[test]
fn end_to_end_hits_the_target_and_shrinks_when_it_must() {
- let dir = std::env::temp_dir().join("omniget-imgcompress-test");
+ let dir = std::env::temp_dir().join("libreget-imgcompress-test");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("grande.png");
photo(1400, 1000).save(&src).unwrap();
@@ -387,7 +387,7 @@ mod tests {
#[test]
fn an_impossible_target_is_admitted_end_to_end() {
- let dir = std::env::temp_dir().join("omniget-imgcompress-hard");
+ let dir = std::env::temp_dir().join("libreget-imgcompress-hard");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("ruido.png");
noisy(1600, 1200).save(&src).unwrap();
@@ -413,7 +413,7 @@ mod tests {
#[test]
fn dry_run_writes_nothing() {
- let dir = std::env::temp_dir().join("omniget-imgcompress-dry");
+ let dir = std::env::temp_dir().join("libreget-imgcompress-dry");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("teste.png");
photo(200, 200).save(&src).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/image_sprite.rs b/src-tauri/libreget-core/src/core/tools/image_sprite.rs
index 0c3a2b40..f4ab5bf8 100644
--- a/src-tauri/libreget-core/src/core/tools/image_sprite.rs
+++ b/src-tauri/libreget-core/src/core/tools/image_sprite.rs
@@ -327,7 +327,7 @@ pub fn atlas_json(frames: &[SpriteFrame], sheet: &str, w: u32, h: u32) -> String
serde_json::to_string_pretty(&serde_json::json!({
"frames": serde_json::Value::Object(map),
"meta": {
- "app": "OmniGet",
+ "app": "LibreGet",
"image": sheet,
"format": "RGBA8888",
"size": { "w": w, "h": h },
@@ -700,7 +700,7 @@ mod tests {
#[test]
fn slicing_a_synthetic_sheet_returns_the_right_pixels() {
- let dir = std::env::temp_dir().join("omniget-sprite-slice");
+ let dir = std::env::temp_dir().join("libreget-sprite-slice");
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let mut sheet = RgbaImage::new(64, 32);
@@ -738,7 +738,7 @@ mod tests {
#[test]
fn pack_then_slice_is_a_round_trip() {
- let dir = std::env::temp_dir().join("omniget-sprite-roundtrip");
+ let dir = std::env::temp_dir().join("libreget-sprite-roundtrip");
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let mut inputs = Vec::new();
@@ -836,7 +836,7 @@ mod tests {
#[test]
fn batch_resizes_a_whole_folder() {
- let dir = std::env::temp_dir().join("omniget-sprite-batch");
+ let dir = std::env::temp_dir().join("libreget-sprite-batch");
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
for i in 0..3u32 {
diff --git a/src-tauri/libreget-core/src/core/tools/image_stitch.rs b/src-tauri/libreget-core/src/core/tools/image_stitch.rs
index 66e6f11e..ea381c6e 100644
--- a/src-tauri/libreget-core/src/core/tools/image_stitch.rs
+++ b/src-tauri/libreget-core/src/core/tools/image_stitch.rs
@@ -634,7 +634,7 @@ mod tests {
#[test]
fn end_to_end_writes_the_long_image() {
- let dir = std::env::temp_dir().join("omniget-stitch-test");
+ let dir = std::env::temp_dir().join("libreget-stitch-test");
std::fs::create_dir_all(&dir).unwrap();
let src = source(120, 400);
let p1 = dir.join("a.png");
diff --git a/src-tauri/libreget-core/src/core/tools/img_bg.rs b/src-tauri/libreget-core/src/core/tools/img_bg.rs
index 42ef4414..ed6a251d 100644
--- a/src-tauri/libreget-core/src/core/tools/img_bg.rs
+++ b/src-tauri/libreget-core/src/core/tools/img_bg.rs
@@ -685,7 +685,7 @@ mod tests {
#[test]
fn a_lista_de_entrada_junta_pasta_e_arquivos_sem_repetir() {
- let dir = std::env::temp_dir().join(format!("omniget-imgbg-{}", std::process::id()));
+ let dir = std::env::temp_dir().join(format!("libreget-imgbg-{}", std::process::id()));
std::fs::create_dir_all(&dir).expect("pasta de teste");
let a = dir.join("a.png");
let b = dir.join("b.jpg");
@@ -716,7 +716,7 @@ mod tests {
#[test]
#[ignore = "rede + runtime: baixa u2netp e remove o fundo de uma imagem sintetica"]
fn remove_o_fundo_de_verdade_com_o_u2netp() {
- let dir = std::env::temp_dir().join("omniget-imgbg-live");
+ let dir = std::env::temp_dir().join("libreget-imgbg-live");
std::fs::create_dir_all(&dir).expect("pasta");
let src = dir.join("alvo.png");
let mut img = image::RgbImage::from_pixel(256, 256, image::Rgb([12, 14, 18]));
diff --git a/src-tauri/libreget-core/src/core/tools/instagram/mod.rs b/src-tauri/libreget-core/src/core/tools/instagram/mod.rs
index fdc6b6be..03484124 100644
--- a/src-tauri/libreget-core/src/core/tools/instagram/mod.rs
+++ b/src-tauri/libreget-core/src/core/tools/instagram/mod.rs
@@ -39,7 +39,7 @@ const ALPHABET: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01
#[derive(Debug, thiserror::Error)]
pub enum IgError {
- #[error("sessao do Instagram nao encontrada: capture os cookies pela extensao do OmniGet com o instagram.com aberto e logado")]
+ #[error("sessao do Instagram nao encontrada: capture os cookies pela extensao do LibreGet com o instagram.com aberto e logado")]
NoSession,
#[error("a sessao do Instagram expirou ou foi desconectada; capture os cookies de novo pela extensao")]
LoginRequired,
diff --git a/src-tauri/libreget-core/src/core/tools/linkedin/checklist.rs b/src-tauri/libreget-core/src/core/tools/linkedin/checklist.rs
index 99a3ecf0..c1e3d89d 100644
--- a/src-tauri/libreget-core/src/core/tools/linkedin/checklist.rs
+++ b/src-tauri/libreget-core/src/core/tools/linkedin/checklist.rs
@@ -412,7 +412,7 @@ mod tests {
#[test]
fn export_sem_perfil_nao_estoura() {
- let tmp = std::env::temp_dir().join(format!("omniget-li-chk-{}", std::process::id()));
+ let tmp = std::env::temp_dir().join(format!("libreget-li-chk-{}", std::process::id()));
let _ = std::fs::create_dir_all(&tmp);
let _ = std::fs::write(tmp.join("Skills.csv"), "Name\nRust\n");
let r = run_dir(&tmp);
diff --git a/src-tauri/libreget-core/src/core/tools/linkedin/connections.rs b/src-tauri/libreget-core/src/core/tools/linkedin/connections.rs
index ffd1da6e..147b77fd 100644
--- a/src-tauri/libreget-core/src/core/tools/linkedin/connections.rs
+++ b/src-tauri/libreget-core/src/core/tools/linkedin/connections.rs
@@ -488,7 +488,7 @@ mod tests {
#[test]
fn export_sem_connections_nao_estoura() {
- let tmp = std::env::temp_dir().join(format!("omniget-li-vazio-{}", std::process::id()));
+ let tmp = std::env::temp_dir().join(format!("libreget-li-vazio-{}", std::process::id()));
let _ = std::fs::create_dir_all(&tmp);
let _ = std::fs::write(tmp.join("Skills.csv"), "Name\nRust\n");
let r = run(&opts(&tmp), &noop_progress()).expect("roda");
diff --git a/src-tauri/libreget-core/src/core/tools/linkedin/messages.rs b/src-tauri/libreget-core/src/core/tools/linkedin/messages.rs
index 07cbe023..d9bfdf3a 100644
--- a/src-tauri/libreget-core/src/core/tools/linkedin/messages.rs
+++ b/src-tauri/libreget-core/src/core/tools/linkedin/messages.rs
@@ -495,7 +495,7 @@ mod tests {
#[test]
fn export_sem_mensagens_nao_estoura() {
- let tmp = std::env::temp_dir().join(format!("omniget-li-msgvazio-{}", std::process::id()));
+ let tmp = std::env::temp_dir().join(format!("libreget-li-msgvazio-{}", std::process::id()));
let _ = std::fs::create_dir_all(&tmp);
let _ = std::fs::write(tmp.join("Skills.csv"), "Name\nRust\n");
let r = run(&opts(&tmp), &noop_progress()).expect("roda");
diff --git a/src-tauri/libreget-core/src/core/tools/linkedin/source.rs b/src-tauri/libreget-core/src/core/tools/linkedin/source.rs
index 8daabf40..4d28a4b4 100644
--- a/src-tauri/libreget-core/src/core/tools/linkedin/source.rs
+++ b/src-tauri/libreget-core/src/core/tools/linkedin/source.rs
@@ -206,7 +206,7 @@ pub(crate) mod fixture {
"Profile.csv",
concat!(
"First Name,Last Name,Headline,Summary,Industry,Geo Location,Websites\n",
- "OpenSelena,Dev,\"Dev de Rust e Svelte que gosta de ferramenta local\",\"Trabalho com aplicativos de desktop ha dez anos.\",Software Development,\"Sao Paulo, Brasil\",[MY_WEBSITE:https://omniget.wtf]\n"
+ "OpenSelena,Dev,\"Dev de Rust e Svelte que gosta de ferramenta local\",\"Trabalho com aplicativos de desktop ha dez anos.\",Software Development,\"Sao Paulo, Brasil\",[MY_WEBSITE:https://libreget.nav.bd]\n"
)
.to_string(),
),
@@ -254,7 +254,7 @@ pub(crate) mod fixture {
/// Escreve o export sintetico numa pasta temporaria unica.
pub fn dir() -> PathBuf {
let root = std::env::temp_dir().join(format!(
- "omniget-li-{}-{}",
+ "libreget-li-{}-{}",
std::process::id(),
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
diff --git a/src-tauri/libreget-core/src/core/tools/music/lyrics.rs b/src-tauri/libreget-core/src/core/tools/music/lyrics.rs
index 7fa1145b..d4966ed8 100644
--- a/src-tauri/libreget-core/src/core/tools/music/lyrics.rs
+++ b/src-tauri/libreget-core/src/core/tools/music/lyrics.rs
@@ -297,7 +297,7 @@ pub fn estimate_lrc(plain: &str, duration_secs: f64, artist: &str, title: &str)
if !title.is_empty() {
out.push_str(&format!("[ti:{title}]\n"));
}
- out.push_str("[by:OmniGet - tempos estimados]\n");
+ out.push_str("[by:LibreGet - tempos estimados]\n");
if lines.is_empty() || duration_secs <= 0.0 {
for l in lines {
out.push_str(&format!("{}{}\n", fmt_ts(0.0), l));
@@ -640,7 +640,7 @@ mod tests {
#[test]
fn lrc_estimado_distribui_pela_duracao() {
let lrc = estimate_lrc("uma\n\ndois\ntres\n", 90.0, "A", "T");
- assert!(lrc.contains("[by:OmniGet - tempos estimados]"));
+ assert!(lrc.contains("[by:LibreGet - tempos estimados]"));
let lines = parse_lrc(&lrc);
assert_eq!(lines.len(), 3);
assert_eq!(lines[0].0, 0.0);
diff --git a/src-tauri/libreget-core/src/core/tools/pdf.rs b/src-tauri/libreget-core/src/core/tools/pdf.rs
index 31c65ed5..2e156a16 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf.rs
@@ -1782,7 +1782,7 @@ mod tests {
#[test]
fn unique_names() {
- let dir = std::env::temp_dir().join(format!("omniget-pdf-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-pdf-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let p = dir.join("a.pdf");
assert_eq!(unique(p.clone()), p);
@@ -1793,14 +1793,14 @@ mod tests {
/// Exercita o FFI de verdade: baixa o PDFium gerido se faltar, monta um
/// PDF de 3 páginas com JPEGs, junta, divide, renderiza e extrai texto.
- /// `cargo test -p omniget-core --lib tools::pdf::tests::live -- --ignored --nocapture`
+ /// `cargo test -p libreget-core --lib tools::pdf::tests::live -- --ignored --nocapture`
#[tokio::test]
#[ignore]
async fn live() {
if !available() {
crate::core::pdfium::ensure_pdfium().await.expect("pdfium");
}
- let dir = std::env::temp_dir().join(format!("omniget-pdf-live-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-pdf-live-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let mut jpegs = Vec::new();
for i in 0..3u8 {
@@ -1884,7 +1884,7 @@ mod tests {
/// PDF montado à mão: uma linha visível e outra coberta por um retângulo
/// preto desenhado por cima — a "tarja" que não apaga nada.
- /// `cargo test -p omniget-core --lib -- --ignored live_redaction`
+ /// `cargo test -p libreget-core --lib -- --ignored live_redaction`
#[test]
#[ignore]
fn live_redaction_check_finds_text_under_the_bar() {
@@ -1904,7 +1904,7 @@ mod tests {
// A xref sai da própria tool de reparo — de quebra, valida ela também.
let (bytes, _) = super::super::pdf_repair::rebuild_xref(body.as_bytes()).unwrap();
- let dir = std::env::temp_dir().join("omniget-redaction-live");
+ let dir = std::env::temp_dir().join("libreget-redaction-live");
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("tarja.pdf");
std::fs::write(&path, &bytes).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_form.rs b/src-tauri/libreget-core/src/core/tools/pdf_form.rs
index 591756ef..09fba746 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_form.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_form.rs
@@ -863,7 +863,7 @@ mod tests {
}
fn tmp() -> PathBuf {
- let dir = std::env::temp_dir().join(format!("omniget-form-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-form-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
dir
}
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_markdown.rs b/src-tauri/libreget-core/src/core/tools/pdf_markdown.rs
index 907068da..e9ce4aa3 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_markdown.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_markdown.rs
@@ -1603,7 +1603,7 @@ mod tests {
/// Ponta a ponta com um PDF montado à mão (mesma técnica do teste de
/// tarja em `pdf.rs`): três páginas com cabeçalho e rodapé corridos,
/// título, parágrafo hifenizado, lista, duas colunas e um bloco em
- /// Courier. `cargo test -p omniget-core --lib -- --ignored live_pdf_markdown`
+ /// Courier. `cargo test -p libreget-core --lib -- --ignored live_pdf_markdown`
#[test]
#[ignore]
fn live_pdf_markdown_de_ponta_a_ponta() {
@@ -1617,7 +1617,7 @@ mod tests {
let mut pages: Vec<String> = Vec::new();
for n in 1..=3 {
let mut c = String::new();
- put(&mut c, "F1", 9.0, 50.0, 760.0, "Manual do OmniGet");
+ put(&mut c, "F1", 9.0, 50.0, 760.0, "Manual do LibreGet");
put(&mut c, "F1", 9.0, 50.0, 40.0, &format!("Pagina {} de 3", n));
match n {
1 => {
@@ -1700,7 +1700,7 @@ mod tests {
}
let (bytes, _) = super::super::pdf_repair::rebuild_xref(body.as_bytes()).unwrap();
- let dir = std::env::temp_dir().join("omniget-pdfmd-live");
+ let dir = std::env::temp_dir().join("libreget-pdfmd-live");
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("guia.pdf");
std::fs::write(&path, &bytes).unwrap();
@@ -1725,7 +1725,7 @@ mod tests {
md.contains("1. abra o app") && md.contains("2. escolha o PDF"),
"lista"
);
- assert!(!md.contains("Manual do OmniGet"), "cabecalho corrido ficou");
+ assert!(!md.contains("Manual do LibreGet"), "cabecalho corrido ficou");
assert!(!md.contains("Pagina 1 de 3"), "rodape corrido ficou");
assert_eq!(out.pages[1].columns, 2, "nao viu as duas colunas");
let esq = md.find("esquerda linha 6").expect("coluna esquerda");
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_redact.rs b/src-tauri/libreget-core/src/core/tools/pdf_redact.rs
index 6d7a0aa6..5db54629 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_redact.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_redact.rs
@@ -1143,7 +1143,7 @@ mod tests {
/// PDF montado à mão, tarjado de verdade, e depois passado pelo próprio
/// `pdf-redaction-check`: ele não pode achar nada escondido.
- /// `cargo test -p omniget-core --lib -- --ignored live_redact`
+ /// `cargo test -p libreget-core --lib -- --ignored live_redact`
#[test]
#[ignore]
fn live_redact_deixa_o_check_limpo() {
@@ -1163,7 +1163,7 @@ mod tests {
));
let (bytes, _) = super::super::pdf_repair::rebuild_xref(body.as_bytes()).unwrap();
- let dir = std::env::temp_dir().join(format!("omniget-redact-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-redact-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("original.pdf");
std::fs::write(&path, &bytes).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_repair.rs b/src-tauri/libreget-core/src/core/tools/pdf_repair.rs
index ce271bcb..bfdd47d0 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_repair.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_repair.rs
@@ -686,13 +686,15 @@ trailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n9999\n%%EOF\n";
}
/// Teste com um PDF de verdade, ligado à mão:
- /// `OMNIGET_PDF=/caminho/arquivo.pdf cargo test -p omniget-core --lib -- --ignored live_rebuild`
+ /// `LIBREGET_PDF=/caminho/arquivo.pdf cargo test -p libreget-core --lib -- --ignored live_rebuild`
/// Quebra a xref como um download truncado quebraria, reconstrói e
/// confere que toda entrada aponta mesmo para o começo de um objeto.
#[test]
#[ignore]
fn live_rebuild_of_a_real_pdf() {
- let path = std::env::var("OMNIGET_PDF").expect("defina OMNIGET_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();
// Aponta o startxref para o nada — o sintoma mais comum.
@@ -735,7 +737,7 @@ trailer\n<< /Size 4 /Root 1 0 R >>\nstartxref\n9999\n%%EOF\n";
checked += 1;
}
assert!(checked > 0, "nenhuma entrada em uso");
- let out = std::env::temp_dir().join("omniget-repair-live.pdf");
+ let out = std::env::temp_dir().join("libreget-repair-live.pdf");
std::fs::write(&out, &fixed).unwrap();
eprintln!(
"{} objetos, {} entradas conferidas → {}",
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_table.rs b/src-tauri/libreget-core/src/core/tools/pdf_table.rs
index a6f629c1..54da458d 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_table.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_table.rs
@@ -559,7 +559,7 @@ mod tests {
],
csv: None,
};
- let dir = std::env::temp_dir().join(format!("omniget-xlsx-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-xlsx-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("t.xlsx");
write_xlsx(&[t], &path).expect("gravar xlsx");
@@ -571,7 +571,7 @@ mod tests {
}
/// PDF de verdade, montado à mão, com uma tabela de três colunas.
- /// `cargo test -p omniget-core --lib -- --ignored live_table`
+ /// `cargo test -p libreget-core --lib -- --ignored live_table`
#[test]
#[ignore]
fn live_table_extract() {
@@ -601,7 +601,7 @@ mod tests {
content
));
let (bytes, _) = super::super::pdf_repair::rebuild_xref(body.as_bytes()).unwrap();
- let dir = std::env::temp_dir().join(format!("omniget-table-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-table-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("tabela.pdf");
std::fs::write(&path, &bytes).unwrap();
diff --git a/src-tauri/libreget-core/src/core/tools/pdf_write.rs b/src-tauri/libreget-core/src/core/tools/pdf_write.rs
index 3729642d..fb2f99fd 100644
--- a/src-tauri/libreget-core/src/core/tools/pdf_write.rs
+++ b/src-tauri/libreget-core/src/core/tools/pdf_write.rs
@@ -892,7 +892,7 @@ mod tests {
}
fn tmp(name: &str) -> PathBuf {
- let dir = std::env::temp_dir().join("omniget-pdfwrite-test");
+ let dir = std::env::temp_dir().join("libreget-pdfwrite-test");
std::fs::create_dir_all(&dir).unwrap();
dir.join(name)
}
diff --git a/src-tauri/libreget-core/src/core/tools/pinterest/media.rs b/src-tauri/libreget-core/src/core/tools/pinterest/media.rs
index 6466eb7e..3cd7cf16 100644
--- a/src-tauri/libreget-core/src/core/tools/pinterest/media.rs
+++ b/src-tauri/libreget-core/src/core/tools/pinterest/media.rs
@@ -397,12 +397,12 @@ mod live {
use super::*;
use crate::core::tools::pinterest::api::Feed;
- /// `cargo test -p omniget-core --lib pinterest::media::live -- --ignored --nocapture`
+ /// `cargo test -p libreget-core --lib pinterest::media::live -- --ignored --nocapture`
#[tokio::test]
#[ignore]
async fn live_download_image_and_video() {
let c = PinClient::new(None).unwrap();
- let dir = std::env::temp_dir().join("omniget-pinterest-live");
+ let dir = std::env::temp_dir().join("libreget-pinterest-live");
let _ = std::fs::remove_dir_all(&dir);
let opts = DownloadOptions {
dest: dir.to_string_lossy().to_string(),
diff --git a/src-tauri/libreget-core/src/core/tools/reddit/gdpr.rs b/src-tauri/libreget-core/src/core/tools/reddit/gdpr.rs
index b1df8141..334a58e3 100644
--- a/src-tauri/libreget-core/src/core/tools/reddit/gdpr.rs
+++ b/src-tauri/libreget-core/src/core/tools/reddit/gdpr.rs
@@ -731,7 +731,7 @@ mod tests {
use super::*;
fn temp() -> PathBuf {
- let d = std::env::temp_dir().join(format!("omniget-rdgdpr-{}", uuid::Uuid::new_v4()));
+ let d = std::env::temp_dir().join(format!("libreget-rdgdpr-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&d).expect("tempdir");
d
}
diff --git a/src-tauri/libreget-core/src/core/tools/reddit/thread.rs b/src-tauri/libreget-core/src/core/tools/reddit/thread.rs
index bab7b2b0..db085c1a 100644
--- a/src-tauri/libreget-core/src/core/tools/reddit/thread.rs
+++ b/src-tauri/libreget-core/src/core/tools/reddit/thread.rs
@@ -717,7 +717,7 @@ pub fn render_html(t: &Thread) -> String {
}
out.push_str("</div>");
out.push_str(&format!(
- "<div class=\"foot\">{} comentários salvos{} · arquivo gerado pelo OmniGet</div>",
+ "<div class=\"foot\">{} comentários salvos{} · arquivo gerado pelo LibreGet</div>",
t.total,
if t.missing > 0 {
format!(" · {} não vieram", t.missing)
@@ -1172,7 +1172,7 @@ mod tests {
#[test]
fn escreve_os_tres_arquivos() {
- let dir = std::env::temp_dir().join(format!("omniget-rdthread-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-rdthread-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).expect("tempdir");
let t = thread_from_fixture();
let base = "teste";
@@ -1195,7 +1195,7 @@ mod tests {
#[tokio::test]
#[ignore = "rede: baixa uma thread publica de verdade do Reddit"]
async fn baixa_uma_thread_publica_de_verdade() {
- let dir = std::env::temp_dir().join("omniget-rdthread-live");
+ let dir = std::env::temp_dir().join("libreget-rdthread-live");
let _ = std::fs::create_dir_all(&dir);
let opts = Options {
url: "https://www.reddit.com/r/rust/comments/1uwmef6/so_long_rrust_and_thanks_for_all_the_slop/".to_string(),
diff --git a/src-tauri/libreget-core/src/core/tools/screen_record.rs b/src-tauri/libreget-core/src/core/tools/screen_record.rs
index 268478ba..bba3f53a 100644
--- a/src-tauri/libreget-core/src/core/tools/screen_record.rs
+++ b/src-tauri/libreget-core/src/core/tools/screen_record.rs
@@ -197,7 +197,7 @@ fn videos_dir() -> PathBuf {
dirs::video_dir()
.or_else(dirs::home_dir)
.unwrap_or_default()
- .join("OmniGet")
+ .join("LibreGet")
}
fn build_args(opts: &RecordOptions, target: &Path, ring: bool) -> Vec<String> {
diff --git a/src-tauri/libreget-core/src/core/tools/shred.rs b/src-tauri/libreget-core/src/core/tools/shred.rs
index c39128ff..e5df16c3 100644
--- a/src-tauri/libreget-core/src/core/tools/shred.rs
+++ b/src-tauri/libreget-core/src/core/tools/shred.rs
@@ -190,7 +190,7 @@ mod tests {
use super::*;
fn tmp(name: &str) -> PathBuf {
- let dir = std::env::temp_dir().join("omniget-shred-test");
+ let dir = std::env::temp_dir().join("libreget-shred-test");
std::fs::create_dir_all(&dir).unwrap();
dir.join(name)
}
diff --git a/src-tauri/libreget-core/src/core/tools/silence_cut.rs b/src-tauri/libreget-core/src/core/tools/silence_cut.rs
index 8d3a20b6..e5e6e170 100644
--- a/src-tauri/libreget-core/src/core/tools/silence_cut.rs
+++ b/src-tauri/libreget-core/src/core/tools/silence_cut.rs
@@ -465,12 +465,12 @@ mod tests {
/// Gera um clipe com um buraco de silêncio conhecido (3 s a 6 s) e
/// confere que o corte acha e remove exatamente aquilo.
- /// `cargo test -p omniget-core --lib -- --ignored live_silence`
+ /// `cargo test -p libreget-core --lib -- --ignored live_silence`
#[tokio::test]
#[ignore]
async fn live_silence_cut_removes_the_known_gap() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await.unwrap();
- let dir = std::env::temp_dir().join("omniget-silence-live");
+ let dir = std::env::temp_dir().join("libreget-silence-live");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("fonte.mp4");
let gen = crate::core::process::command(&ffmpeg)
diff --git a/src-tauri/libreget-core/src/core/tools/sponsorblock.rs b/src-tauri/libreget-core/src/core/tools/sponsorblock.rs
index 296f786f..acd8646a 100644
--- a/src-tauri/libreget-core/src/core/tools/sponsorblock.rs
+++ b/src-tauri/libreget-core/src/core/tools/sponsorblock.rs
@@ -140,7 +140,7 @@ pub async fn segments(input: &str, categories: &[String]) -> anyhow::Result<Spon
// servidor deriva dela o identificador público — por isso ela nunca pode
// nascer do nome, do e-mail ou do hardware de quem usa o app.
-pub const USER_AGENT_TAG: &str = concat!("OmniGet/", env!("CARGO_PKG_VERSION"));
+pub const USER_AGENT_TAG: &str = concat!("LibreGet/", env!("CARGO_PKG_VERSION"));
pub const USER_FILE: &str = "sponsorblock-user.txt";
/// Um envio de uma vez só; acima disso o servidor devolve limite de taxa.
pub const MAX_SEGMENTS_PER_SUBMIT: usize = 10;
@@ -456,7 +456,7 @@ mod submit_tests {
assert!(body["userAgent"]
.as_str()
.unwrap_or_default()
- .starts_with("OmniGet/"));
+ .starts_with("LibreGet/"));
let s = &body["segments"][0];
assert_eq!(s["segment"][0], 30.0);
assert_eq!(s["segment"][1], 45.5);
diff --git a/src-tauri/libreget-core/src/core/tools/srt_translate.rs b/src-tauri/libreget-core/src/core/tools/srt_translate.rs
index 079d1b50..53b0ecb5 100644
--- a/src-tauri/libreget-core/src/core/tools/srt_translate.rs
+++ b/src-tauri/libreget-core/src/core/tools/srt_translate.rs
@@ -11,7 +11,7 @@ use crate::core::subtitle_merge::Cue;
#[derive(Debug, Clone, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum Translator {
- /// Provedor de IA já configurado no OmniGet (OpenAI, Anthropic, local).
+ /// Provedor de IA já configurado no LibreGet (OpenAI, Anthropic, local).
Llm,
LibreTranslate {
base_url: String,
diff --git a/src-tauri/libreget-core/src/core/tools/startup.rs b/src-tauri/libreget-core/src/core/tools/startup.rs
index 56b0ef4f..8d8bebe5 100644
--- a/src-tauri/libreget-core/src/core/tools/startup.rs
+++ b/src-tauri/libreget-core/src/core/tools/startup.rs
@@ -587,7 +587,7 @@ mod tests {
#[cfg(test)]
mod live {
- /// `cargo test -p omniget-core --lib tools::startup::live -- --ignored --nocapture`
+ /// `cargo test -p libreget-core --lib tools::startup::live -- --ignored --nocapture`
#[tokio::test]
#[ignore]
async fn list_here() {
diff --git a/src-tauri/libreget-core/src/core/tools/sticker.rs b/src-tauri/libreget-core/src/core/tools/sticker.rs
index 2dcf03a3..73cedac2 100644
--- a/src-tauri/libreget-core/src/core/tools/sticker.rs
+++ b/src-tauri/libreget-core/src/core/tools/sticker.rs
@@ -646,12 +646,12 @@ pub async fn run(
.collect();
let emojis: Vec<String> = opts.emoji.split_whitespace().map(str::to_string).collect();
let name = if opts.pack_name.trim().is_empty() {
- "OmniGet".to_string()
+ "LibreGet".to_string()
} else {
opts.pack_name.trim().to_string()
};
let author = if opts.pack_author.trim().is_empty() {
- "OmniGet".to_string()
+ "LibreGet".to_string()
} else {
opts.pack_author.trim().to_string()
};
@@ -882,14 +882,14 @@ mod tests {
}
/// Gera figurinha de verdade a partir de uma imagem e de um clipe curtos.
- /// `cargo test -p omniget-core --lib -- --ignored live_sticker`
+ /// `cargo test -p libreget-core --lib -- --ignored live_sticker`
#[tokio::test]
#[ignore]
async fn live_sticker_fits_the_limits() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg()
.await
.expect("ffmpeg gerido");
- let dir = std::env::temp_dir().join(format!("omniget-sticker-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-sticker-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir).expect("tempdir");
// Fonte estática: PNG com alfa e uma forma colorida.
diff --git a/src-tauri/libreget-core/src/core/tools/sysclean.rs b/src-tauri/libreget-core/src/core/tools/sysclean.rs
index e9e7a297..81e03631 100644
--- a/src-tauri/libreget-core/src/core/tools/sysclean.rs
+++ b/src-tauri/libreget-core/src/core/tools/sysclean.rs
@@ -68,7 +68,7 @@ const DEFS: &[Def] = &[
d("adobe", "apps", "Adobe (Media Cache)", "review", &["~/Library/Application Support/Adobe/Common/Media Cache Files", "~/Library/Application Support/Adobe/Common/Media Cache", "~/Library/Application Support/Adobe/Common/Peak Files"]),
d("telegram", "apps", "Telegram", "review", &["~/Library/Group Containers/6N38VWS5BX.ru.keepcoder.Telegram/appstore/account-*/postbox/media", "~/Library/Application Support/Telegram Desktop/tdata/user_data/cache"]),
d("whatsapp", "apps", "WhatsApp", "safe", &["~/Library/Group Containers/group.net.whatsapp.WhatsApp.shared/Message/Media/tmp", "~/Library/Containers/net.whatsapp.WhatsApp/Data/Library/Caches"]),
- d("omniget-tmp", "apps", "OmniGet (temporários das tools)", "safe", &["~/Library/Application Support/com.openselena.libreget/tools/tmp"]),
+ d("libreget-tmp", "apps", "LibreGet (temporários das tools)", "safe", &["~/Library/Application Support/com.openselena.libreget/tools/tmp"]),
d("xcode-derived", "dev", "Xcode DerivedData", "safe", &["~/Library/Developer/Xcode/DerivedData"]),
d("xcode-device-support", "dev", "Xcode iOS DeviceSupport", "review", &["~/Library/Developer/Xcode/iOS DeviceSupport", "~/Library/Developer/Xcode/watchOS DeviceSupport", "~/Library/Developer/Xcode/tvOS DeviceSupport"]),
d("simulator-caches", "dev", "Simulator caches", "safe", &["~/Library/Developer/CoreSimulator/Caches"]),
@@ -339,9 +339,9 @@ const DEFS: &[Def] = &[
],
),
d(
- "omniget-tmp",
+ "libreget-tmp",
"apps",
- "OmniGet (temporários das tools)",
+ "LibreGet (temporários das tools)",
"safe",
&["%APPDATA%\\com.openselena.libreget\\tools\\tmp"],
),
@@ -616,9 +616,9 @@ const DEFS: &[Def] = &[
],
),
d(
- "omniget-tmp",
+ "libreget-tmp",
"apps",
- "OmniGet (temporários das tools)",
+ "LibreGet (temporários das tools)",
"safe",
&[
"~/.local/share/com.openselena.libreget/tools/tmp",
@@ -954,15 +954,15 @@ mod tests {
#[test]
fn vars() {
- std::env::set_var("OMNIGET_T", "/x");
- assert_eq!(expand_vars("%OMNIGET_T%/y"), "/x/y");
+ std::env::set_var("LIBREGET_T", "/x");
+ assert_eq!(expand_vars("%LIBREGET_T%/y"), "/x/y");
assert_eq!(expand_vars("%NOPE_NOPE%/y"), "%NOPE_NOPE%/y");
assert!(expand("%NOPE_NOPE%/y").is_empty());
}
#[test]
fn measure_and_clean() {
- let dir = std::env::temp_dir().join(format!("omniget-clean-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-clean-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(dir.join("sub")).unwrap();
std::fs::write(dir.join("a.bin"), vec![0u8; 100]).unwrap();
std::fs::write(dir.join("sub/b.bin"), vec![0u8; 50]).unwrap();
@@ -977,7 +977,7 @@ mod tests {
#[cfg(test)]
mod live {
- /// `cargo test -p omniget-core --lib tools::sysclean::live -- --ignored --nocapture`
+ /// `cargo test -p libreget-core --lib tools::sysclean::live -- --ignored --nocapture`
#[test]
#[ignore]
fn scan_here() {
diff --git a/src-tauri/libreget-core/src/core/tools/tiktok/sound.rs b/src-tauri/libreget-core/src/core/tools/tiktok/sound.rs
index 58c22212..cfa7cd24 100644
--- a/src-tauri/libreget-core/src/core/tools/tiktok/sound.rs
+++ b/src-tauri/libreget-core/src/core/tools/tiktok/sound.rs
@@ -188,7 +188,7 @@ pub fn sidecar_text(a: &Attribution) -> String {
if a.duration > 0 {
out.push_str(&format!("Duração: {}s\n", a.duration));
}
- out.push_str("\nBaixado com o OmniGet. Dê o crédito ao usar.\n");
+ out.push_str("\nBaixado com o LibreGet. Dê o crédito ao usar.\n");
out
}
diff --git a/src-tauri/libreget-core/src/core/tools/uninstall.rs b/src-tauri/libreget-core/src/core/tools/uninstall.rs
index d1ad7b33..e0fba941 100644
--- a/src-tauri/libreget-core/src/core/tools/uninstall.rs
+++ b/src-tauri/libreget-core/src/core/tools/uninstall.rs
@@ -792,7 +792,7 @@ mod tests {
#[cfg(test)]
mod live {
- /// `cargo test -p omniget-core --lib tools::uninstall::live -- --ignored --nocapture`
+ /// `cargo test -p libreget-core --lib tools::uninstall::live -- --ignored --nocapture`
#[tokio::test]
#[ignore]
async fn list_here() {
diff --git a/src-tauri/libreget-core/src/core/tools/video_compress.rs b/src-tauri/libreget-core/src/core/tools/video_compress.rs
index c44a6d42..2a342fe3 100644
--- a/src-tauri/libreget-core/src/core/tools/video_compress.rs
+++ b/src-tauri/libreget-core/src/core/tools/video_compress.rs
@@ -254,7 +254,7 @@ async fn compress_one(
};
let output = out_dir.join(format!("{}{}.{}", stem, suffix, container(&opts.codec)));
- let log_dir = std::env::temp_dir().join(format!("omniget-2pass-{}", uuid::Uuid::new_v4()));
+ let log_dir = std::env::temp_dir().join(format!("libreget-2pass-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&log_dir)?;
let log = log_dir.join("pass");
@@ -411,12 +411,12 @@ mod tests {
/// Ponta a ponta com o FFmpeg gerido: gera um clipe, comprime para 1 MB
/// e confere que o alvo foi respeitado sem perder áudio nem duração.
- /// `cargo test -p omniget-core --lib -- --ignored live_compress`
+ /// `cargo test -p libreget-core --lib -- --ignored live_compress`
#[tokio::test]
#[ignore]
async fn live_compress_hits_the_target() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await.unwrap();
- let dir = std::env::temp_dir().join("omniget-vcompress-live");
+ let dir = std::env::temp_dir().join("libreget-vcompress-live");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("fonte.mp4");
let gen = crate::core::process::command(&ffmpeg)
diff --git a/src-tauri/libreget-core/src/core/tools/video_gif.rs b/src-tauri/libreget-core/src/core/tools/video_gif.rs
index 3de25af1..0a433171 100644
--- a/src-tauri/libreget-core/src/core/tools/video_gif.rs
+++ b/src-tauri/libreget-core/src/core/tools/video_gif.rs
@@ -150,7 +150,7 @@ async fn convert_one(ffmpeg: &Path, opts: &GifOptions, input: &str) -> anyhow::R
}
} else {
let tmp =
- std::env::temp_dir().join(format!("omniget-palette-{}.png", uuid::Uuid::new_v4()));
+ std::env::temp_dir().join(format!("libreget-palette-{}.png", uuid::Uuid::new_v4()));
let pass1 = crate::core::process::command(ffmpeg)
.args(["-y", "-hide_banner", "-loglevel", "error"])
.args(&cut)
@@ -285,12 +285,12 @@ mod tests {
}
/// Ponta a ponta com o FFmpeg gerido, nos dois formatos.
- /// `cargo test -p omniget-core --lib -- --ignored live_gif`
+ /// `cargo test -p libreget-core --lib -- --ignored live_gif`
#[tokio::test]
#[ignore]
async fn live_gif_and_webp_come_out_readable() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await.unwrap();
- let dir = std::env::temp_dir().join("omniget-gif-live");
+ let dir = std::env::temp_dir().join("libreget-gif-live");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("fonte.mp4");
let gen = crate::core::process::command(&ffmpeg)
@@ -361,7 +361,7 @@ mod tests {
.any(|e| e
.file_name()
.to_string_lossy()
- .starts_with("omniget-palette-")),
+ .starts_with("libreget-palette-")),
"sobrou paleta temporária"
);
}
diff --git a/src-tauri/libreget-core/src/core/tools/video_restore.rs b/src-tauri/libreget-core/src/core/tools/video_restore.rs
index b5cfdb3a..8834aede 100644
--- a/src-tauri/libreget-core/src/core/tools/video_restore.rs
+++ b/src-tauri/libreget-core/src/core/tools/video_restore.rs
@@ -157,7 +157,7 @@ async fn restore_one(
let mut trf: Option<PathBuf> = None;
if opts.stabilize {
- let dir = std::env::temp_dir().join(format!("omniget-vidstab-{}", uuid::Uuid::new_v4()));
+ let dir = std::env::temp_dir().join(format!("libreget-vidstab-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&dir)?;
let file = dir.join("transforms.trf");
let detect = format!(
@@ -338,12 +338,12 @@ mod tests {
/// vidstab é filtro de biblioteca externa: se a build do FFmpeg gerido
/// não trouxer, o teste falha aqui e não na mão do usuário.
- /// `cargo test -p omniget-core --lib -- --ignored live_stabilize`
+ /// `cargo test -p libreget-core --lib -- --ignored live_stabilize`
#[tokio::test]
#[ignore]
async fn live_stabilize_runs_both_passes() {
let ffmpeg = crate::core::dependencies::ensure_ffmpeg().await.unwrap();
- let dir = std::env::temp_dir().join("omniget-vidstab-live");
+ let dir = std::env::temp_dir().join("libreget-vidstab-live");
std::fs::create_dir_all(&dir).unwrap();
let src = dir.join("tremido.mp4");
// testsrc2 com um deslocamento senoidal em x/y: tremor sintético.
@@ -407,7 +407,7 @@ mod tests {
.any(|e| e
.file_name()
.to_string_lossy()
- .starts_with("omniget-vidstab-")
+ .starts_with("libreget-vidstab-")
&& e.path().join("transforms.trf").exists()),
"sobrou .trf temporário"
);
diff --git a/src-tauri/libreget-core/src/core/tools/vimeo.rs b/src-tauri/libreget-core/src/core/tools/vimeo.rs
index 945af6ed..705f82eb 100644
--- a/src-tauri/libreget-core/src/core/tools/vimeo.rs
+++ b/src-tauri/libreget-core/src/core/tools/vimeo.rs
@@ -1,4 +1,4 @@
-//! Vimeo: dois caminhos que o yt-dlp já sabe fazer, mas que a UI do OmniGet
+//! Vimeo: dois caminhos que o yt-dlp já sabe fazer, mas que a UI do LibreGet
//! ainda não expunha direito.
//!
//! 1. **Acesso privado / unlisted** — o link com hash (`vimeo.com/<id>/<hash>`)
@@ -29,7 +29,8 @@ const ID_SHOWCASE: &str = "vm-showcase";
/// Marcadores do `--print` do yt-dlp: é assim que sabemos o arquivo final e o
/// título sem ter que adivinhar a extensão.
const MARK_FILE: &str = "LIBREGET_FILEPATH:";
-const MARK_META: &str = "OMNIGET_META:";
+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] = &[
@@ -803,7 +804,7 @@ async fn run_download(
if !rest.is_empty() {
file = Some(rest.to_string());
}
- } else if let Some(rest) = l.strip_prefix(MARK_META) {
+ } else if let Some(rest) = l.strip_prefix(MARK_META).or_else(|| l.strip_prefix(LEGACY_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/core/tools/voicestudio.rs b/src-tauri/libreget-core/src/core/tools/voicestudio.rs
index 0ded242a..93043634 100644
--- a/src-tauri/libreget-core/src/core/tools/voicestudio.rs
+++ b/src-tauri/libreget-core/src/core/tools/voicestudio.rs
@@ -217,7 +217,7 @@ fn out_path(output_dir: &str, name: &str) -> PathBuf {
dirs::audio_dir()
.or_else(dirs::home_dir)
.unwrap_or_default()
- .join("OmniGet")
+ .join("LibreGet")
} else {
PathBuf::from(output_dir.trim())
};
diff --git a/src-tauri/libreget-core/src/core/tools/whisper.rs b/src-tauri/libreget-core/src/core/tools/whisper.rs
index 0f8b29e8..f133ac4e 100644
--- a/src-tauri/libreget-core/src/core/tools/whisper.rs
+++ b/src-tauri/libreget-core/src/core/tools/whisper.rs
@@ -2,7 +2,7 @@
//!
//! O binário `whisper-cli` vem da release oficial no Windows (x64, CPU ou
//! cuBLAS) e no Linux (Ubuntu x64/arm64). No macOS o upstream só publica o
-//! xcframework, então lá o OmniGet usa o `whisper-cli` do sistema (Homebrew:
+//! xcframework, então lá o LibreGet usa o `whisper-cli` do sistema (Homebrew:
//! `brew install whisper-cpp`) ou um caminho escolhido pelo usuário.
//! Modelos GGML vêm do Hugging Face para `<app_data>/models/whisper/`.
diff --git a/src-tauri/libreget-core/src/core/tools/win_tweaks.rs b/src-tauri/libreget-core/src/core/tools/win_tweaks.rs
index 52ec0866..f2982fd3 100644
--- a/src-tauri/libreget-core/src/core/tools/win_tweaks.rs
+++ b/src-tauri/libreget-core/src/core/tools/win_tweaks.rs
@@ -610,7 +610,7 @@ pub async fn apply(id: &str, enable: bool) -> anyhow::Result<Rule> {
{
if rule.requires_admin && !is_admin().await {
return Err(anyhow!(
- "essa regra precisa do OmniGet aberto como administrador"
+ "essa regra precisa do LibreGet aberto como administrador"
));
}
if let Some(prev) = reg_query(&rule.key, &rule.name).await {
diff --git a/src-tauri/libreget-core/src/core/tools/x/fx.rs b/src-tauri/libreget-core/src/core/tools/x/fx.rs
index d0493188..0b54e640 100644
--- a/src-tauri/libreget-core/src/core/tools/x/fx.rs
+++ b/src-tauri/libreget-core/src/core/tools/x/fx.rs
@@ -16,7 +16,7 @@ fn client() -> anyhow::Result<reqwest::Client> {
let mut headers = HeaderMap::new();
headers.insert(
USER_AGENT,
- HeaderValue::from_static("OmniGet/0.9 (+https://github.com/OpenSelena/omniget)"),
+ HeaderValue::from_static("LibreGet/0.9 (+https://github.com/OpenSelena/libreget)"),
);
Ok(
crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
diff --git a/src-tauri/libreget-core/src/core/tools/yt_archive.rs b/src-tauri/libreget-core/src/core/tools/yt_archive.rs
index e066fa50..23552915 100644
--- a/src-tauri/libreget-core/src/core/tools/yt_archive.rs
+++ b/src-tauri/libreget-core/src/core/tools/yt_archive.rs
@@ -2,7 +2,7 @@
//!
//! O `--download-archive` do yt-dlp já evita rebaixar o que existe, mas ele é
//! só uma lista de IDs: não sabe dizer o que falhou nem por quê. Aqui mora um
-//! estado próprio ao lado do destino (`.omniget-archive.json`), com um status
+//! estado próprio ao lado do destino (`.libreget-archive.json`), com um status
//! por item, para a UI mostrar a fila e para o app poder ser fechado no meio.
use std::path::{Path, PathBuf};
@@ -12,12 +12,15 @@ use std::time::Duration;
use anyhow::anyhow;
use serde::{Deserialize, Serialize};
-pub const STATE_FILE: &str = ".omniget-archive.json";
-pub const ARCHIVE_FILE: &str = ".omniget-archive.txt";
+pub const STATE_FILE: &str = ".libreget-archive.json";
+pub const ARCHIVE_FILE: &str = ".libreget-archive.txt";
+pub const LEGACY_STATE_FILE: &str = ".omniget-archive.json";
+pub const LEGACY_ARCHIVE_FILE: &str = ".omniget-archive.txt";
const STATE_VERSION: u32 = 1;
const ID: &str = "yt-archive";
/// Prefixo do `--print` para separar o caminho final das linhas de progresso.
-const FILE_MARK: &str = "__omniget_file__";
+const FILE_MARK: &str = "__libreget_file__";
+const LEGACY_FILE_MARK: &str = "__omniget_file__";
// ── yt-dlp como processo ───────────────────────────────────────────────
@@ -231,7 +234,13 @@ impl ArchiveState {
}
pub fn state_path(dest: &Path) -> PathBuf {
- dest.join(STATE_FILE)
+ let new_path = dest.join(STATE_FILE);
+ let legacy_path = dest.join(LEGACY_STATE_FILE);
+ if !new_path.exists() && legacy_path.exists() {
+ legacy_path
+ } else {
+ new_path
+ }
}
pub fn load_state(dest: &Path) -> Option<ArchiveState> {
@@ -347,13 +356,19 @@ pub fn parse_percent(line: &str) -> Option<f64> {
/// Linha do `--print` com o arquivo final.
pub fn parse_printed_file(line: &str) -> Option<String> {
- let idx = line.find(FILE_MARK)?;
- let path = line[idx + FILE_MARK.len()..].trim();
- if path.is_empty() {
- None
- } else {
- Some(path.to_string())
+ if let Some(idx) = line.find(FILE_MARK) {
+ let path = line[idx + FILE_MARK.len()..].trim();
+ if !path.is_empty() {
+ return Some(path.to_string());
+ }
}
+ if let Some(idx) = line.find(LEGACY_FILE_MARK) {
+ let path = line[idx + LEGACY_FILE_MARK.len()..].trim();
+ if !path.is_empty() {
+ return Some(path.to_string());
+ }
+ }
+ None
}
// ── Opções e execução ──────────────────────────────────────────────────
@@ -559,7 +574,11 @@ pub async fn run(opts: Options, progress: super::ProgressFn) -> anyhow::Result<A
let mut st = open_state(&opts, &dest, &progress).await?;
let bin = ytdlp_path().await?;
let cookie = CookieFile::new(opts.session_netscape.as_deref())?;
- let archive_txt = dest.join(ARCHIVE_FILE);
+ let archive_txt = if !dest.join(ARCHIVE_FILE).exists() && dest.join(LEGACY_ARCHIVE_FILE).exists() {
+ dest.join(LEGACY_ARCHIVE_FILE)
+ } else {
+ dest.join(ARCHIVE_FILE)
+ };
let total = st.items.len() as u64;
let limit = match opts.max_items {
0 => usize::MAX,
@@ -1249,7 +1268,7 @@ mod tests {
/// Baixa um vídeo curto de verdade, confere o estado gravado e roda de
/// novo para provar que a retomada não rebaixa nada.
- /// `cargo test -p omniget-core --lib -- --ignored live_yt_archive_resumes`
+ /// `cargo test -p libreget-core --lib -- --ignored live_yt_archive_resumes`
#[tokio::test]
#[ignore]
async fn live_yt_archive_resumes_without_downloading_twice() {
@@ -1296,7 +1315,7 @@ mod tests {
}
/// Precisa de rede e do yt-dlp.
- /// `cargo test -p omniget-core --lib -- --ignored live_yt_archive`
+ /// `cargo test -p libreget-core --lib -- --ignored live_yt_archive`
#[tokio::test]
#[ignore]
async fn live_yt_archive_enumerates_a_public_playlist() {
diff --git a/src-tauri/libreget-core/src/core/tools/yt_chapters.rs b/src-tauri/libreget-core/src/core/tools/yt_chapters.rs
index d9653259..e681c37e 100644
--- a/src-tauri/libreget-core/src/core/tools/yt_chapters.rs
+++ b/src-tauri/libreget-core/src/core/tools/yt_chapters.rs
@@ -791,7 +791,7 @@ frame= 2 fps=0.0 q=-0.0 size=N/A time=00:00:00.08
/// Gera um clipe com dois cortes de cena e silêncio no meio e confere que
/// os capítulos caem onde deveriam.
- /// `cargo test -p omniget-core --lib -- --ignored live_yt_chapters`
+ /// `cargo test -p libreget-core --lib -- --ignored live_yt_chapters`
#[tokio::test]
#[ignore]
async fn live_yt_chapters_finds_the_planted_cut() {
diff --git a/src-tauri/libreget-core/src/core/tools/yt_dataset.rs b/src-tauri/libreget-core/src/core/tools/yt_dataset.rs
index 65717759..b345b568 100644
--- a/src-tauri/libreget-core/src/core/tools/yt_dataset.rs
+++ b/src-tauri/libreget-core/src/core/tools/yt_dataset.rs
@@ -3,7 +3,7 @@
//! O `yt_archive` sabe enumerar uma URL; para juntar vídeos de várias buscas
//! (ex.: todos os guias de um jogo, em vários idiomas) a fila precisa ser
//! semeada com resultados já filtrados. `seed` grava esses itens no mesmo
-//! estado `.omniget-archive.json`, sem rede, e o `yt_archive::run` segue dali
+//! estado `.libreget-archive.json`, sem rede, e o `yt_archive::run` segue dali
//! com retomada, falhas registradas e teto de espaço em disco.
use std::path::Path;
@@ -21,7 +21,7 @@ pub struct SeedResult {
pub total: usize,
}
-/// Lê NDJSON (uma linha por vídeo, como o `omniget search --json` imprime)
+/// Lê NDJSON (uma linha por vídeo, como o `libreget search --json` imprime)
/// e devolve itens pendentes. Linha sem `id` ou que não é JSON é ignorada.
pub fn parse_seed(text: &str) -> Vec<ArchiveItem> {
let mut seen = std::collections::HashSet::new();
diff --git a/src-tauri/libreget-core/src/core/tools/yt_notes.rs b/src-tauri/libreget-core/src/core/tools/yt_notes.rs
index 4176bff8..887e8479 100644
--- a/src-tauri/libreget-core/src/core/tools/yt_notes.rs
+++ b/src-tauri/libreget-core/src/core/tools/yt_notes.rs
@@ -997,7 +997,7 @@ Já isto é outro assunto.
}
/// Precisa de rede e do yt-dlp.
- /// `cargo test -p omniget-core --lib -- --ignored live_yt_notes`
+ /// `cargo test -p libreget-core --lib -- --ignored live_yt_notes`
#[tokio::test]
#[ignore]
async fn live_yt_notes_builds_markdown_from_a_real_video() {
diff --git a/src-tauri/libreget-core/src/core/tools/yt_search.rs b/src-tauri/libreget-core/src/core/tools/yt_search.rs
index 904d7002..c7ebb3ec 100644
--- a/src-tauri/libreget-core/src/core/tools/yt_search.rs
+++ b/src-tauri/libreget-core/src/core/tools/yt_search.rs
@@ -1,8 +1,8 @@
//! Busca de vídeos por texto (YouTube/SoundCloud) via `ytsearchN:`.
//!
-//! Mora no core, e não só no comando Tauri, para que a UI e o `omniget-cli`
+//! Mora no core, e não só no comando Tauri, para que a UI e o `libreget-cli`
//! usem a mesma busca: a CLI precisa dela para montar acervos a partir de uma
-//! lista de termos (ex.: `omniget search "mir4 boss" --json > hits.ndjson`),
+//! lista de termos (ex.: `libreget search "mir4 boss" --json > hits.ndjson`),
//! e os filtros de duração/título ficam numa função pura testável sem rede.
use serde::Serialize;
@@ -219,7 +219,7 @@ not json
}
/// Precisa de rede e do yt-dlp.
- /// `cargo test -p omniget-core --lib -- --ignored live_yt_search`
+ /// `cargo test -p libreget-core --lib -- --ignored live_yt_search`
#[tokio::test]
#[ignore]
async fn live_yt_search_returns_hits() {
diff --git a/src-tauri/libreget-core/src/core/ytdlp.rs b/src-tauri/libreget-core/src/core/ytdlp.rs
index cb9c6814..ea61daef 100644
--- a/src-tauri/libreget-core/src/core/ytdlp.rs
+++ b/src-tauri/libreget-core/src/core/ytdlp.rs
@@ -6292,20 +6292,21 @@ ERROR: [youtube] abc123: Requested format is not available";
/// Teste de ponta a ponta contra o yt-dlp gerido, ignorado por padrão porque
/// depende de rede e do binário local. Rodar com:
-/// `OMNIGET_YTDLP=~/Library/Application\ Support/com.openselena.libreget/bin/yt-dlp cargo test -p omniget-core --features desktop -- --ignored e2e_download_reports_streams --nocapture`
+/// `LIBREGET_YTDLP=~/Library/Application\ Support/com.openselena.libreget/bin/yt-dlp cargo test -p libreget-core --features desktop -- --ignored e2e_download_reports_streams --nocapture`
#[cfg(test)]
mod e2e {
#[tokio::test]
#[ignore]
async fn e2e_download_reports_streams() {
- let ytdlp = match std::env::var("OMNIGET_YTDLP") {
+ let ytdlp = match std::env::var("LIBREGET_YTDLP").or_else(|_| std::env::var("OMNIGET_YTDLP")) {
Ok(p) => std::path::PathBuf::from(p),
Err(_) => return,
};
- let out = std::env::temp_dir().join(format!("omniget-e2e-{}", std::process::id()));
+ let out = std::env::temp_dir().join(format!("libreget-e2e-{}", std::process::id()));
std::fs::create_dir_all(&out).unwrap();
let (tx, mut rx) = tokio::sync::mpsc::channel(256);
- let url = std::env::var("OMNIGET_E2E_URL")
+ let url = std::env::var("LIBREGET_E2E_URL")
+ .or_else(|_| std::env::var("OMNIGET_E2E_URL"))
.unwrap_or_else(|_| "https://www.youtube.com/watch?v=jNQXAC9IVRw".to_string());
let collector = tokio::spawn(async move {
let mut seen = Vec::new();
diff --git a/src-tauri/src/core/portable.rs b/src-tauri/src/core/portable.rs
index c18c333e..6a67c29e 100644
--- a/src-tauri/src/core/portable.rs
+++ b/src-tauri/src/core/portable.rs
@@ -49,7 +49,7 @@ mod tests {
#[test]
fn portatil_fica_ao_lado_do_executavel() {
- let dir = PathBuf::from("/media/pendrive/OmniGet/data");
+ let dir = PathBuf::from("/media/pendrive/LibreGet/data");
let got = portable_webview_dir(Some(&dir)).expect("portatil tem diretorio");
assert_eq!(got, dir.join("webview"));
// O ponto da issue #195: nada pode acabar sob o perfil do usuario.
@@ -58,10 +58,10 @@ mod tests {
#[test]
fn caminho_com_espaco_sobrevive() {
- // Windows portatil vive em "C:\Users\x\Downloads\OmniGet 0.7.7\data".
- let dir = PathBuf::from("C:/Users/x/Downloads/OmniGet 0.7.7/data");
+ // Windows portatil vive em "C:\Users\x\Downloads\LibreGet 0.7.7\data".
+ let dir = PathBuf::from("C:/Users/x/Downloads/LibreGet 0.7.7/data");
let got = portable_webview_dir(Some(&dir)).expect("portatil tem diretorio");
- assert!(got.to_string_lossy().contains("OmniGet 0.7.7"));
+ assert!(got.to_string_lossy().contains("LibreGet 0.7.7"));
assert!(got.ends_with("webview"));
}
@@ -188,7 +188,7 @@ mod runtime_fixo_tests {
}
fn tempdir(tag: &str) -> PathBuf {
- let d = std::env::temp_dir().join(format!("omniget-rt-{tag}-{}", std::process::id()));
+ let d = std::env::temp_dir().join(format!("libreget-rt-{tag}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&d);
std::fs::create_dir_all(&d).expect("cria tempdir");
d
@@ -197,7 +197,7 @@ mod runtime_fixo_tests {
#[test]
fn sem_runtime_ao_lado_nao_inventa_caminho() {
let d = tempdir("vazio");
- std::fs::write(d.join("omniget.exe"), b"stub").expect("cria exe");
+ std::fs::write(d.join("libreget.exe"), b"stub").expect("cria exe");
assert_eq!(find_fixed_runtime(&d), None);
let _ = std::fs::remove_dir_all(&d);
}
diff --git a/src-tauri/src/extension_storage.rs b/src-tauri/src/extension_storage.rs
index b9314eca..96412cde 100644
--- a/src-tauri/src/extension_storage.rs
+++ b/src-tauri/src/extension_storage.rs
@@ -463,7 +463,7 @@ mod tests {
#[test]
fn metadata_map_roundtrip_preserves_multiple_urls() {
let tmp = std::env::temp_dir().join(format!(
- "omniget-meta-test-{}.json",
+ "libreget-meta-test-{}.json",
current_unix_timestamp()
));
let _ = fs::remove_file(&tmp);
@@ -501,7 +501,7 @@ mod tests {
#[test]
fn write_empty_metadata_map_removes_file() {
let tmp = std::env::temp_dir().join(format!(
- "omniget-meta-empty-{}.json",
+ "libreget-meta-empty-{}.json",
current_unix_timestamp()
));
fs::write(&tmp, "{}").unwrap();
diff --git a/src-tauri/src/local_bridge.rs b/src-tauri/src/local_bridge.rs
index 975a50f9..b5a2282a 100644
--- a/src-tauri/src/local_bridge.rs
+++ b/src-tauri/src/local_bridge.rs
@@ -704,7 +704,7 @@ async fn enqueue(
StatusCode::BAD_REQUEST,
"UNSUPPORTED_PROTOCOL",
format!(
- "Extension protocol v{client_version} is newer than host v{HOST_MAX_PROTOCOL_VERSION}. Please update OmniGet."
+ "Extension protocol v{client_version} is newer than host v{HOST_MAX_PROTOCOL_VERSION}. Please update LibreGet."
),
);
}
@@ -814,7 +814,7 @@ async fn cookies_export(
StatusCode::BAD_REQUEST,
"UNSUPPORTED_PROTOCOL",
format!(
- "Extension protocol v{client_version} is newer than host v{HOST_MAX_PROTOCOL_VERSION}. Please update OmniGet."
+ "Extension protocol v{client_version} is newer than host v{HOST_MAX_PROTOCOL_VERSION}. Please update LibreGet."
),
);
}
@@ -889,7 +889,7 @@ async fn mcp_post(
return unauthorized();
}
if !crate::mcp::enabled() {
- return (StatusCode::FORBIDDEN, Json(serde_json::json!({ "error": "MCP server is disabled in OmniGet → Tools → MCP server" }))).into_response();
+ return (StatusCode::FORBIDDEN, Json(serde_json::json!({ "error": "MCP server is disabled in LibreGet → Tools → MCP server" }))).into_response();
}
let msg: serde_json::Value = match serde_json::from_slice(&body) {
Ok(v) => v,
diff --git a/src-tauri/src/mcp.rs b/src-tauri/src/mcp.rs
index e1c94bb6..d2ed12a0 100644
--- a/src-tauri/src/mcp.rs
+++ b/src-tauri/src/mcp.rs
@@ -639,7 +639,7 @@ pub fn client_snippets(url: &str, token: &str) -> Vec<(String, String)> {
),
(
"Goose".into(),
- format!("extensions:\n omniget:\n enabled: true\n type: streamable_http\n name: libreget\n uri: {}\n headers:\n Authorization: Bearer {}\n timeout: 300", url, token),
+ format!("extensions:\n libreget:\n enabled: true\n type: streamable_http\n name: libreget\n uri: {}\n headers:\n Authorization: Bearer {}\n timeout: 300", url, token),
),
(
"Claude Desktop".into(),
diff --git a/src-tauri/src/platforms/p2p/mod.rs b/src-tauri/src/platforms/p2p/mod.rs
index 09468492..2c5c0535 100644
--- a/src-tauri/src/platforms/p2p/mod.rs
+++ b/src-tauri/src/platforms/p2p/mod.rs
@@ -18,8 +18,9 @@ use crate::platforms::traits::PlatformDownloader;
const CHUNK_SIZE: usize = 64 * 1024;
fn relay_addr() -> anyhow::Result<String> {
- std::env::var("OMNIGET_RELAY")
- .map_err(|_| anyhow!("P2P relay server not configured. Set OMNIGET_RELAY environment variable."))
+ 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."))
}
async fn connect_relay() -> anyhow::Result<TcpStream> {
diff --git a/src-tauri/src/tray.rs b/src-tauri/src/tray.rs
index 144895e4..89a611a6 100644
--- a/src-tauri/src/tray.rs
+++ b/src-tauri/src/tray.rs
@@ -94,7 +94,7 @@ fn tooltip_for(labels: &TrayLabels, count: u32, speed_bps: Option<f64>) -> Strin
if count == 0 {
return "LibreGet".into();
}
- let mut tooltip = format!("OmniGet — {}{}", count, labels.active_suffix);
+ let mut tooltip = format!("LibreGet — {}{}", count, labels.active_suffix);
if let Some(bps) = speed_bps.filter(|bps| *bps > 0.0) {
tooltip.push_str(" · ");
tooltip.push_str(&format_speed(bps, labels));
@@ -164,7 +164,7 @@ impl BadgeCache {
pub fn setup(app: &AppHandle) -> tauri::Result<()> {
let labels = labels();
- let open_item = MenuItemBuilder::with_id("open", "OmniGet").build(app)?;
+ let open_item = MenuItemBuilder::with_id("open", "LibreGet").build(app)?;
let downloads_item = MenuItemBuilder::with_id("downloads", active_label_for(&labels, 0))
.enabled(false)
.build(app)?;
@@ -198,7 +198,7 @@ pub fn setup(app: &AppHandle) -> tauri::Result<()> {
TrayIconBuilder::with_id("main-tray")
.icon(icon)
- .tooltip("OmniGet")
+ .tooltip("LibreGet")
.menu(&menu)
.on_menu_event(|app, event| match event.id().as_ref() {
"open" => show_window(app),
@@ -704,11 +704,11 @@ mod tests {
#[test]
fn tooltip_switches_between_count_and_speed() {
let labels = TrayLabels::default();
- assert_eq!(tooltip_for(&labels, 0, Some(1024.0)), "OmniGet");
- assert_eq!(tooltip_for(&labels, 2, None), "OmniGet — 2 active");
+ assert_eq!(tooltip_for(&labels, 0, Some(1024.0)), "LibreGet");
+ assert_eq!(tooltip_for(&labels, 2, None), "LibreGet — 2 active");
assert_eq!(
tooltip_for(&labels, 1, Some(2.0 * 1024.0 * 1024.0)),
- "OmniGet — 1 active · 2.0 MB/s"
+ "LibreGet — 1 active · 2.0 MB/s"
);
}