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 remaining telegram paths, ytdlp sentinels, binary version archives, and agent skills
IGECT4fb189dbaf9c
diff --git a/.agents/skills/video-archive/SKILL.md b/.agents/skills/video-archive/SKILL.mdindex 6ddf8eda..cc0da70b 100644--- a/.agents/skills/video-archive/SKILL.md+++ b/.agents/skills/video-archive/SKILL.md@@ -1,8 +1,8 @@---name: video-archivedescription: >-- Build or grow a local video dataset from YouTube with the OmniGet CLI- (`omniget-cli search` + `omniget-cli archive`): many search terms in many+ Build or grow a local video dataset from YouTube with the LibreGet CLI+ (`libreget search` + `libreget archive`): many search terms in manylanguages, duration and title filters, low-resolution H.264 files, subtitlesand `.info.json` metadata, a GB cap, and a queue that resumes after a stop.Use when asked to "download every video about X", "build a gameplay/tutorial@@ -10,10 +10,10 @@ description: >-download".----# Video archive with the OmniGet CLI+# Video archive with the LibreGet CLI-The CLI binary is `omniget-cli` (installed with-`cargo install --path src-tauri/omniget-cli --root ~/.local --locked`).+The CLI binary is `libreget` (installed with+`cargo install --path src-tauri/libreget-cli --root ~/.local --locked`).Everything below runs without the desktop app open. `yt-dlp` is found on PATHor in the app's data folder; `ffmpeg` must be on PATH.@@ -24,7 +24,7 @@ or in the app's data folder; `ffmpeg` must be on PATH.queries.txt one search term per line, # for commentshits.ndjson output of search (one video per line)videos/ the archive: <uploader>/<title> [<id>].mp4 + .srt + .info.json- videos/.omniget-archive.json queue state (pending/ok/failed/skipped)+ videos/.libreget-archive.json queue state (pending/ok/failed/skipped)run.log NDJSON log of the last archive run```@@ -33,7 +33,7 @@ or in the app's data folder; `ffmpeg` must be on PATH.1. **Search.** One term per language and theme; filters cut shorts, livestreams and off-topic results. Results are deduplicated across terms.```bash- omniget-cli --json search --queries-file queries.txt -n 100 \+ libreget --json search --queries-file queries.txt -n 100 \--min-duration 120 --max-duration 5400 --title-has "mir4,mir 4" \> hits.ndjson 2> search.log```@@ -41,7 +41,7 @@ or in the app's data folder; `ffmpeg` must be on PATH.2. **Seed and download.** `--seed` adds only new ids; what is already donestays done.```bash- omniget-cli --json archive --dest videos --seed hits.ndjson \+ libreget --json archive --dest videos --seed hits.ndjson \--quality 360 --subs ".*-orig" --info-json --max-gb 30 --sleep 5 \>> run.log 2>&1```@@ -49,11 +49,11 @@ or in the app's data folder; `ffmpeg` must be on PATH.passed instead of (or with) `--seed`; it is re-listed on every run so newuploads join the queue.3. **Check progress** without downloading:- `omniget-cli --json archive --dest videos --scan-only | tail -1`+ `libreget --json archive --dest videos --scan-only | tail -1`(the last line is the summary: `done`, `failed`, `pending`, `size_bytes`,`cap_reached`).4. **Resume** by running the same archive command again. Ctrl+C, or- `pkill -INT -f "omniget-cli --json archive"`, stops yt-dlp within a second+ `pkill -INT -f "libreget --json archive"`, stops yt-dlp within a secondand puts the current item back in the queue (its `.part` is reused). Waitfor the process to exit before starting another run on the same folder.5. **Retry failures** later with `--retry-failed`. If the network drops, thediff --git a/AGENTS.md b/AGENTS.mdindex 418c3730..93109af8 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -102,7 +102,7 @@ Single-context (`GLOSSARY.md` and `docs/adr/`). See `docs/agents/domain.md`.### Video datasets from the CLI-`libreget-cli search` + `omniget-cli archive` build a resumable local video archive (search terms, filters, size cap). See [.agents/skills/video-archive/SKILL.md](.agents/skills/video-archive/SKILL.md).+`libreget search` + `libreget archive` build a resumable local video archive (search terms, filters, size cap). See [.agents/skills/video-archive/SKILL.md](.agents/skills/video-archive/SKILL.md).---diff --git a/assets/announcements.json b/assets/announcements.jsonindex 49029c4e..879c92e4 100644--- a/assets/announcements.json+++ b/assets/announcements.json@@ -3,8 +3,8 @@"id": "announcement-openselena-telegram-v2","active": false,"title": "Open Selena Telegram",- "thumbnail": "https://raw.githubusercontent.com/OpenSelena/omniget/main/assets/announcement-poster.png",- "body": "Join the official Telegram channel of OpenSelena, where we share beta updates of OmniGet, new feature announcements, bug fixes, and the latest AI news and leaks.",+ "thumbnail": "https://raw.githubusercontent.com/OpenSelena/libreget/main/assets/announcement-poster.png",+ "body": "Join the official Telegram channel of OpenSelena, where we share beta updates of LibreGet, new feature announcements, bug fixes, and the latest AI news and leaks.","cta": {"label": "Join Telegram Channel","url": "https://t.me/openselena"diff --git a/scripts/shots.mjs b/scripts/shots.mjsindex a306e859..b03e1d39 100644--- a/scripts/shots.mjs+++ b/scripts/shots.mjs@@ -239,7 +239,7 @@ function initScript(theme) {case "plugin:event|emit_to":return null;case "plugin:app|version": return "0.7.0";- case "plugin:app|name": return "OmniGet";+ case "plugin:app|name": return "LibreGet";case "plugin:updater|check": return null;case "get_settings": return F.SETTINGS;case "save_settings": return null;@@ -254,9 +254,9 @@ function initScript(theme) {case "rpc_set_idle_stats": return null;case "plugin_command": return null;case "get_download_log": return args && args.downloadId === 1- ? ["[omniget] $ yt-dlp -f 'bv*[height<=1080]+ba' … https://www.youtube.com/watch?v=live1", "[youtube] live1: Downloading webpage", "[info] live1: Downloading 2 format(s): 299+140", "[dashsegments] Total fragments: 25", "[download] Destination: Conference Keynote 2026.f299.mp4"]+ ? ["[libreget] $ yt-dlp -f 'bv*[height<=1080]+ba' … https://www.youtube.com/watch?v=live1", "[youtube] live1: Downloading webpage", "[info] live1: Downloading 2 format(s): 299+140", "[dashsegments] Total fragments: 25", "[download] Destination: Conference Keynote 2026.f299.mp4"]: args && args.downloadId === 4- ? ["[omniget] $ yt-dlp -f 'bv*+ba' … https://www.youtube.com/watch?v=priv1", "ERROR: [youtube] priv1: Private video. Sign in if you've been granted access"]+ ? ["[libreget] $ yt-dlp -f 'bv*+ba' … https://www.youtube.com/watch?v=priv1", "ERROR: [youtube] priv1: Private video. Sign in if you've been granted access"]: [];case "get_download_command": return null;case "retry_download_with_command": return "ok";@@ -307,7 +307,7 @@ async function main() {console.log("starting vite dev...");devProc = spawn("pnpm", ["dev"], {cwd: process.cwd(),- env: { ...process.env, OMNIGET_I18N_STRICT: "0" },+ env: { ...process.env, LIBREGET_I18N_STRICT: "0", OMNIGET_I18N_STRICT: "0" },stdio: "ignore",detached: false,});diff --git a/src-tauri/libreget-core/src/core/ytdlp.rs b/src-tauri/libreget-core/src/core/ytdlp.rsindex 7dd5abb6..cb9c6814 100644--- a/src-tauri/libreget-core/src/core/ytdlp.rs+++ b/src-tauri/libreget-core/src/core/ytdlp.rs@@ -450,7 +450,7 @@ pub(crate) fn prepare_override_args(}if !args.iter()- .any(|a| a.starts_with("after_move:OMNIGET_FILEPATH"))+ .any(|a| a.starts_with("after_move:LIBREGET_FILEPATH") || a.starts_with("after_move:OMNIGET_FILEPATH")){args.push("--print".to_string());args.push("after_move:LIBREGET_FILEPATH:%(filepath)s".to_string());@@ -1110,7 +1110,9 @@ async fn probe_pot_provider(base_url: &str) -> super::pot_provider::ProviderHeal}fn pot_provider_base_url() -> Option<String> {- let raw = std::env::var("OMNIGET_POT_PROVIDER_URL").ok()?;+ let raw = std::env::var("LIBREGET_POT_PROVIDER_URL")+ .or_else(|_| std::env::var("OMNIGET_POT_PROVIDER_URL"))+ .ok()?;super::pot_provider::normalize_base_url(&raw)}@@ -1634,7 +1636,7 @@ fn parse_python_version(out: &str) -> Option<(u32, u32)> {fn python_candidates() -> Vec<PathBuf> {let mut v = Vec::new();- if let Ok(custom) = std::env::var("OMNIGET_PYTHON") {+ if let Ok(custom) = std::env::var("LIBREGET_PYTHON").or_else(|_| std::env::var("OMNIGET_PYTHON")) {if !custom.trim().is_empty() {v.push(PathBuf::from(custom.trim()));}@@ -1919,7 +1921,7 @@ pub enum YtdlpChannel {}fn ytdlp_channel() -> YtdlpChannel {- match std::env::var("OMNIGET_YTDLP_CHANNEL") {+ match std::env::var("LIBREGET_YTDLP_CHANNEL").or_else(|_| std::env::var("OMNIGET_YTDLP_CHANNEL")) {Ok(v) if v.trim().eq_ignore_ascii_case("nightly") => YtdlpChannel::Nightly,_ => YtdlpChannel::Stable,}@@ -2948,7 +2950,7 @@ pub async fn get_playlist_info_incremental(}let archive_path =- std::env::temp_dir().join(format!("omniget-chan-archive-{}.txt", std::process::id()));+ std::env::temp_dir().join(format!("libreget-chan-archive-{}.txt", std::process::id()));{let mut content = String::with_capacity(seen_ids.len() * 24);for id in seen_ids {@@ -3822,7 +3824,7 @@ pub async fn download_video(}_ => {tracing::warn!(- "[yt-dlp] no output path captured from yt-dlp stdout (OMNIGET_FILEPATH / Destination / Merger); falling back to output-dir glob scan"+ "[yt-dlp] no output path captured from yt-dlp stdout (LIBREGET_FILEPATH / Destination / Merger); falling back to output-dir glob scan");find_downloaded_file(output_dir, url).await?}@@ -4036,7 +4038,7 @@ pub async fn download_video(}None => {tracing::warn!(- "[yt-dlp] PO token exigido e nenhum provedor configurado — ver OMNIGET_POT_PROVIDER_URL"+ "[yt-dlp] PO token exigido e nenhum provedor configurado — ver LIBREGET_POT_PROVIDER_URL");}}@@ -4215,7 +4217,7 @@ fn spawn_stdout_reader(_timer_start.elapsed());}- if let Some(rest) = line.strip_prefix("LIBREGET_FILEPATH:") {+ if let Some(rest) = line.strip_prefix("LIBREGET_FILEPATH:").or_else(|| line.strip_prefix("OMNIGET_FILEPATH:")) {let final_path = rest.trim();if !final_path.is_empty() && final_path != "NA" {authoritative_capture = true;@@ -5420,7 +5422,7 @@ mod tests {assert!(args.contains(&PROGRESS_TEMPLATE.to_string()));assert!(args.iter()- .any(|a| a.starts_with("after_move:OMNIGET_FILEPATH")));+ .any(|a| a.starts_with("after_move:LIBREGET_FILEPATH") || a.starts_with("after_move:OMNIGET_FILEPATH")));assert!(args.contains(&"-o".to_string()), "sem -o, recebe o padrão");assert_eq!(args.iter().filter(|a| *a == url).count(),@@ -6058,27 +6060,32 @@ ERROR: [youtube] abc123: Requested format is not available";#[test]fn sem_variavel_nao_ha_provedor_de_pot_token() {- // Um teste so, sequencial: set_var e global ao processo.- let restore = std::env::var("OMNIGET_POT_PROVIDER_URL").ok();+ let restore_libreget = std::env::var("LIBREGET_POT_PROVIDER_URL").ok();+ let restore_omniget = std::env::var("OMNIGET_POT_PROVIDER_URL").ok();+ std::env::remove_var("LIBREGET_POT_PROVIDER_URL");std::env::remove_var("OMNIGET_POT_PROVIDER_URL");assert_eq!(pot_provider_base_url(), None, "sem env nao ha provedor");- std::env::set_var("OMNIGET_POT_PROVIDER_URL", " ");+ std::env::set_var("LIBREGET_POT_PROVIDER_URL", " ");assert_eq!(pot_provider_base_url(),None,"espaco em branco viraria argumento quebrado no yt-dlp");- std::env::set_var("OMNIGET_POT_PROVIDER_URL", "localhost:4416/");+ std::env::set_var("LIBREGET_POT_PROVIDER_URL", "localhost:4416/");assert_eq!(pot_provider_base_url(),Some("http://localhost:4416".to_string()),"o que o usuario digita tem que virar URL valida");- match restore {+ match restore_libreget {+ Some(v) => std::env::set_var("LIBREGET_POT_PROVIDER_URL", v),+ None => std::env::remove_var("LIBREGET_POT_PROVIDER_URL"),+ }+ match restore_omniget {Some(v) => std::env::set_var("OMNIGET_POT_PROVIDER_URL", v),None => std::env::remove_var("OMNIGET_POT_PROVIDER_URL"),}diff --git a/src-tauri/libreget-core/src/models/settings.rs b/src-tauri/libreget-core/src/models/settings.rsindex 76d35291..b6516c01 100644--- a/src-tauri/libreget-core/src/models/settings.rs+++ b/src-tauri/libreget-core/src/models/settings.rs@@ -72,7 +72,7 @@ fn default_rpc_app_id() -> String {}fn default_rpc_image_key() -> String {- "omniget_music".into()+ "libreget_music".into()}#[derive(Debug, Clone, Serialize, Deserialize, Default)]@@ -464,7 +464,7 @@ impl Default for TypographySettings {font_mono: default_font_mono(),line_height_base: default_line_height_base(),spacing_scale: default_spacing_scale(),- preset_name: Some("omniget-default".into()),+ preset_name: Some("libreget-default".into()),}}}diff --git a/src-tauri/plugins/courses/src/platforms/udemy/webview_api.rs b/src-tauri/plugins/courses/src/platforms/udemy/webview_api.rsindex c8261c35..e148054d 100644--- a/src-tauri/plugins/courses/src/platforms/udemy/webview_api.rs+++ b/src-tauri/plugins/courses/src/platforms/udemy/webview_api.rs@@ -24,7 +24,7 @@ pub async fn ensure_api_webview(.visible(false).inner_size(100.0, 100.0).initialization_script(- r#"window.__omniget_fetch = function(url) {+ r#"window.__libreget_fetch = window.__omniget_fetch = function(url) {fetch(url, {credentials: 'include',headers: {@@ -34,15 +34,16 @@ pub async fn ensure_api_webview(}).then(function(r) { return r.text() }).then(function(text) {- window.location.href = 'https://omniget-api-result.local/?data=' + encodeURIComponent(text);+ window.location.href = 'https://libreget-api-result.local/?data=' + encodeURIComponent(text);}).catch(function(err) {- window.location.href = 'https://omniget-api-result.local/?error=' + encodeURIComponent(err.message);+ window.location.href = 'https://libreget-api-result.local/?error=' + encodeURIComponent(err.message);});};"#,).on_navigation(move |url| {- if url.host_str() == Some("omniget-api-result.local") {+ let host = url.host_str().unwrap_or("");+ if host == "libreget-api-result.local" || host == "omniget-api-result.local" {for (key, value) in url.query_pairs() {if key == "data" {*store.lock().unwrap() = Some(value.to_string());@@ -73,7 +74,7 @@ pub async fn webview_get() -> anyhow::Result<String> {*result_store.lock().unwrap() = None;- let js = format!("window.__omniget_fetch('{}')", url);+ let js = format!("(window.__libreget_fetch || window.__omniget_fetch)('{}')", url);window.eval(&js).map_err(|e| anyhow!("eval failed: {}", e))?;diff --git a/src-tauri/plugins/telegram/src/commands/telegram.rs b/src-tauri/plugins/telegram/src/commands/telegram.rsindex 639ec5c2..a9b40a93 100644--- a/src-tauri/plugins/telegram/src/commands/telegram.rs+++ b/src-tauri/plugins/telegram/src/commands/telegram.rs@@ -1053,7 +1053,7 @@ pub async fn telegram_clone_start(let created = api::create_channel_or_folder(&state.telegram_session,&new_title,- "Cloned with OmniGet",+ "Cloned with LibreGet",false,).awaitdiff --git a/src-tauri/plugins/telegram/src/lib.rs b/src-tauri/plugins/telegram/src/lib.rsindex f16649d0..253760b4 100644--- a/src-tauri/plugins/telegram/src/lib.rs+++ b/src-tauri/plugins/telegram/src/lib.rs@@ -1242,7 +1242,7 @@ impl LibregetPlugin for TelegramPlugin {let chat = platforms::telegram::api::create_channel_or_folder(&state.telegram_session,&title,- "OmniGet Drive Folder",+ "LibreGet Drive Folder",false,).awaitdiff --git a/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs b/src-tauri/plugins/telegram/src/platforms/telegram/auth.rsindex df128867..65e2184a 100644--- a/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs+++ b/src-tauri/plugins/telegram/src/platforms/telegram/auth.rs@@ -50,7 +50,16 @@ 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"))?;- Ok(data_dir.join("omniget").join("telegram.session"))+ 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)+ }}pub async fn disconnect_and_clear_client(handle: &TelegramSessionHandle) {diff --git a/src-tauri/plugins/telegram/src/platforms/telegram/downloader.rs b/src-tauri/plugins/telegram/src/platforms/telegram/downloader.rsindex e9b9ff10..33a9d685 100644--- a/src-tauri/plugins/telegram/src/platforms/telegram/downloader.rs+++ b/src-tauri/plugins/telegram/src/platforms/telegram/downloader.rs@@ -229,7 +229,7 @@ impl PlatformDownloader for TelegramDownloader {.filename_template.as_deref().is_none_or(|t| t == default_filename_template());- let prefix = if use_prefix { "omniget-" } else { "" };+ let prefix = if use_prefix { "libreget-" } else { "" };let filename = format!("{}{}.{}",prefix,diff --git a/src-tauri/plugins/telegram/src/state.rs b/src-tauri/plugins/telegram/src/state.rsindex e0b574f2..6d062ffe 100644--- a/src-tauri/plugins/telegram/src/state.rs+++ b/src-tauri/plugins/telegram/src/state.rs@@ -195,22 +195,39 @@ pub struct TelegramStreamInfo {pub base_url: String,}+pub fn libreget_data_dir() -> PathBuf {+ let base = dirs::data_dir().unwrap_or_else(|| PathBuf::from("."));+ let new_dir = base.join("libreget");+ let old_dir = base.join("omniget");+ if !new_dir.exists() && old_dir.exists() {+ old_dir+ } else {+ new_dir+ }+}++#[allow(dead_code)]pub fn omniget_data_dir() -> PathBuf {- dirs::data_dir()- .unwrap_or_else(|| PathBuf::from("."))- .join("omniget")+ libreget_data_dir()}pub fn persistent_state_path() -> PathBuf {- omniget_data_dir().join("telegram_plugin_state.json")+ let base = dirs::data_dir().unwrap_or_else(|| PathBuf::from("."));+ let new_path = base.join("libreget").join("telegram_plugin_state.json");+ let old_path = base.join("omniget").join("telegram_plugin_state.json");+ if !new_path.exists() && old_path.exists() {+ old_path+ } else {+ new_path+ }}pub fn accounts_dir() -> PathBuf {- omniget_data_dir().join("telegram_accounts")+ libreget_data_dir().join("telegram_accounts")}pub fn backups_dir() -> PathBuf {- omniget_data_dir().join("telegram_backups")+ libreget_data_dir().join("telegram_backups")}impl TelegramPersistentData {diff --git a/src-tauri/src/commands/app_lifecycle.rs b/src-tauri/src/commands/app_lifecycle.rsindex 56e7c285..04cdac8c 100644--- a/src-tauri/src/commands/app_lifecycle.rs+++ b/src-tauri/src/commands/app_lifecycle.rs@@ -48,7 +48,9 @@ pub fn get_portable_info() -> PortableInfo {PortableInfo {is_portable,- data_dir: std::env::var("OMNIGET_DATA_DIR").ok(),+ data_dir: std::env::var("LIBREGET_DATA_DIR")+ .or_else(|_| std::env::var("OMNIGET_DATA_DIR"))+ .ok(),macos_webview_notice: cfg!(target_os = "macos") && is_portable,}}diff --git a/src-tauri/src/commands/browser_extension.rs b/src-tauri/src/commands/browser_extension.rsindex a01288c3..7a3827ad 100644--- a/src-tauri/src/commands/browser_extension.rs+++ b/src-tauri/src/commands/browser_extension.rs@@ -60,7 +60,7 @@ pub async fn browser_extension_status(app: AppHandle,) -> Result<Vec<BrowserExtensionStatus>, String> {// `installable` used to be a hardcoded `true`. The Windows portable build- // is the bare `omniget.exe` with no `resources/` folder beside it, so the+ // is the bare `libreget.exe` with no `resources/` folder beside it, so the// export copied nothing and still reported a path — the user opened an// empty folder and had no idea why (issue #310). Ask the bundle whether the// extension is actually there; when it is not, the UI falls back to thediff --git a/src-tauri/src/commands/dependencies.rs b/src-tauri/src/commands/dependencies.rsindex b47ba0d4..bbb921ec 100644--- a/src-tauri/src/commands/dependencies.rs+++ b/src-tauri/src/commands/dependencies.rs@@ -299,7 +299,7 @@ pub async fn set_dependency_path(name: String, source_path: String) -> Result<St// Issue #222: referenciar no lugar, nao copiar. Uma copia dentro do// diretorio do app envelhece sozinha — o usuario atualiza o binario dele e- // o OmniGet segue usando a versao velha sem avisar.+ // o LibreGet segue usando a versao velha sem avisar.libreget_core::core::binary_overrides::set(&name, &src)?;if name == "yt-dlp" {diff --git a/src-tauri/src/commands/plugins.rs b/src-tauri/src/commands/plugins.rsindex e5f99b65..ecfd50be 100644--- a/src-tauri/src/commands/plugins.rs+++ b/src-tauri/src/commands/plugins.rs@@ -248,6 +248,8 @@ pub async fn plugin_command(}const REGISTRY_URLS: &[&str] = &[+ "https://raw.githubusercontent.com/OpenSelena/libreget-plugins/main/plugins.json",+ "https://cdn.jsdelivr.net/gh/OpenSelena/libreget-plugins@main/plugins.json","https://raw.githubusercontent.com/OpenSelena/omniget-plugins/main/plugins.json","https://cdn.jsdelivr.net/gh/OpenSelena/omniget-plugins@main/plugins.json",];diff --git a/src-tauri/src/commands/torrent_playback.rs b/src-tauri/src/commands/torrent_playback.rsindex c2a5f47d..764be19c 100644--- a/src-tauri/src/commands/torrent_playback.rs+++ b/src-tauri/src/commands/torrent_playback.rs@@ -1,6 +1,6 @@//! Quando da para comecar a assistir um torrent que ainda esta baixando.//!-//! B46. O modulo `core::torrent_stream` foi escrito supondo que o OmniGet+//! B46. O modulo `core::torrent_stream` foi escrito supondo que o LibreGet//! escolheria a ordem das pecas. Ao ligar, apareceu que o `librqbit` **ja faz//! isso**: `ManagedTorrent::stream(file_id)` devolve um `FileStream` que//! prioriza as pecas sob o cursor de leitura sozinho.diff --git a/src-tauri/src/core/binary_versions.rs b/src-tauri/src/core/binary_versions.rsindex 2c2fe8fd..4cfc8b37 100644--- a/src-tauri/src/core/binary_versions.rs+++ b/src-tauri/src/core/binary_versions.rs@@ -16,13 +16,14 @@ use std::path::{Path, PathBuf};/// hoje quebrou, volto para a de ontem) sem virar acumulo de 100 MB.pub const KEEP_VERSIONS: usize = 3;-const SUFFIX: &str = ".omniget-prev.";+const SUFFIX: &str = ".libreget-prev.";+const LEGACY_SUFFIX: &str = ".omniget-prev.";/// Caminho de arquivamento de `binary`, carimbado.////// O carimbo vai no fim e nao no meio do nome para o `find_tool` continuar/// enxergando so o binario ativo: ele procura por nome exato, e um `yt-dlp`-/// arquivado como `yt-dlp.omniget-prev.123` nao colide.+/// arquivado como `yt-dlp.libreget-prev.123` nao colide.pub fn archive_path(binary: &Path, stamp_ms: u128) -> PathBuf {let name = binary.file_name()@@ -34,7 +35,7 @@ pub fn archive_path(binary: &Path, stamp_ms: u128) -> PathBuf {/// `Some(carimbo)` quando o arquivo e um arquivamento de `binary_name`.pub fn parse_archive(file_name: &str, binary_name: &str) -> Option<u128> {let rest = file_name.strip_prefix(binary_name)?;- let stamp = rest.strip_prefix(SUFFIX)?;+ let stamp = rest.strip_prefix(SUFFIX).or_else(|| rest.strip_prefix(LEGACY_SUFFIX))?;stamp.parse().ok()}@@ -117,7 +118,7 @@ mod tests {fn tmp(nome: &str) -> PathBuf {let d = std::env::temp_dir().join(format!(- "omniget-bv-{nome}-{}",+ "libreget-bv-{nome}-{}",std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap()@@ -133,14 +134,19 @@ mod tests {let p = archive_path(Path::new("/bin/yt-dlp"), 1234);assert_eq!(p.file_name().unwrap().to_str().unwrap(),- "yt-dlp.omniget-prev.1234"+ "yt-dlp.libreget-prev.1234");assert_ne!(p.file_name().unwrap(), "yt-dlp");+ assert_eq!(+ parse_archive("yt-dlp.libreget-prev.1234", "yt-dlp"),+ Some(1234)+ );assert_eq!(parse_archive("yt-dlp.omniget-prev.1234", "yt-dlp"),Some(1234));assert_eq!(parse_archive("yt-dlp", "yt-dlp"), None);+ assert_eq!(parse_archive("ffmpeg.libreget-prev.1", "yt-dlp"), None);assert_eq!(parse_archive("ffmpeg.omniget-prev.1", "yt-dlp"), None);}