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.

chore(release): bump version to v0.16.1, update docs and changelog

IGECTb2a7f7552ab5
diff --git a/docs/changelog/index.html b/docs/changelog/index.html
index 44327537..c9bed7be 100644
--- a/docs/changelog/index.html
+++ b/docs/changelog/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
@@ -1502,12 +1502,44 @@
Release notes, feature changes, and system patches for OmniGet. All desktop releases are signed, reproducible, and published with SHA-256 binary validation.
</p>
- <!-- v0.16.0 Release -->
+ <!-- v0.16.1 Release -->
+ <article class="release-box" id="v0-16-1">
+ <div class="release-header">
+ <div>
+ <div style="display: flex; align-items: center; gap: 8px;">
+ <span class="release-tag-pill">v0.16.1 Latest Stable</span>
+ <span class="release-date">Released November 2026</span>
+ </div>
+ <h2 class="release-title">Platform Media Stability Patch: Queue Kind Refinement, Thumbnail Resolution, Unix Process Group Termination &amp; CPU Throttling</h2>
+ </div>
+ <a href="https://github.com/OpenSelena/omniget/releases/tag/v0.16.1" target="_blank" rel="noopener" class="subtab-item" style="border: 1px solid var(--border); text-decoration: none;">
+ <span>GitHub Tag</span>
+ <svg class="icon icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
+ </a>
+ </div>
+
+ <div class="release-section">
+ <h3 class="release-section-title">
+ <svg class="icon icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
+ Bug Fixes &amp; Stability Patches
+ </h3>
+ <ul class="release-list">
+ <li><strong>Photo Post Media Kind Refinement</strong>: Corrected download queue kind categorization so photo and carousel items from Instagram and Twitter correctly display photo icons and card badges rather than defaulting to video.</li>
+ <li><strong>Instagram Photo Post Thumbnails</strong>: Populated thumbnail URLs and extracted creator usernames for single-image and carousel posts in the native Instagram extractor.</li>
+ <li><strong>Twitter / X Preview Shimmer Guard</strong>: Propagated high-resolution image URLs to thumbnail metadata and added a fallback container in the omnibox preview to prevent infinite skeleton shimmer when thumbnails are unavailable.</li>
+ <li><strong>Unix Process Group Termination</strong>: Assigned dedicated POSIX process groups (<code>process_group(0)</code>) to child engine processes in Nami and added direct PID termination fallback, ensuring the Stop button reliably kills background tasks.</li>
+ <li><strong>CPU Usage Throttling</strong>: Capped yt-dlp concurrent fragment downloads to 4, constrained ffmpeg postprocessor threads to 2, and added debouncing to omnibox metadata prefetching.</li>
+ <li><strong>Threads Share URL Resolution</strong>: Followed HTTP 301/302 redirects on <code>threads.net/share/</code> and <code>threads.com/share/</code> tokens to canonical post URLs before ID extraction.</li>
+ </ul>
+ </div>
+ </article>
+
+ <!-- v0.16.0 Release -->
<article class="release-box" id="v0-16-0">
<div class="release-header">
<div>
<div style="display: flex; align-items: center; gap: 8px;">
- <span class="release-tag-pill">v0.16.0 Latest Stable</span>
+ <span class="sidebar-tag">v0.16.0</span>
<span class="release-date">Released November 2026</span>
</div>
<h2 class="release-title">Nami Core Overhaul: SQLite Media Ledger, History Grid, Incremental Creator Sync &amp; Zero-Extension Cookie Bridge</h2>
@@ -2347,7 +2379,8 @@
<span>On this page</span>
</div>
<ul class="toc-list" id="tocList">
- <li><a href="#v0-16-0" class="toc-link">v0.16.0 (Latest Stable)</a></li>
+ <li><a href="#v0-16-1" class="toc-link">v0.16.1 (Latest Stable)</a></li>
+ <li><a href="#v0-16-0" class="toc-link">v0.16.0</a></li>
<li><a href="#v0-15-1" class="toc-link">v0.15.1</a></li>
<li><a href="#v0-15-0" class="toc-link">v0.15.0</a></li>
<li><a href="#v0-14-3" class="toc-link">v0.14.3</a></li>
diff --git a/docs/courses/index.html b/docs/courses/index.html
index 051cfe28..ac56dd0f 100644
--- a/docs/courses/index.html
+++ b/docs/courses/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link active">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
diff --git a/docs/index.html b/docs/index.html
index 5abb30ad..ba2fcff7 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="./courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
@@ -1950,17 +1950,17 @@
Track every update and bugfix shipped in OmniGet. OmniGet follows Semantic Versioning and publishes signed artifacts with SHA-256 checksums for every desktop release.
</p>
- <!-- v0.16.0 Release -->
+ <!-- v0.16.1 Release -->
<div style="background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px;">
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 14px;">
<div>
<div style="display: flex; align-items: center; gap: 10px;">
- <span class="sidebar-tag" style="background: var(--primary); color: var(--text-inverse); font-weight: 600; padding: 3px 8px; border-radius: 6px;">v0.16.0 Latest Release</span>
+ <span class="sidebar-tag" style="background: var(--primary); color: var(--text-inverse); font-weight: 600; padding: 3px 8px; border-radius: 6px;">v0.16.1 Latest Release</span>
<span style="font-size: 13px; color: var(--text-subtle);">Released November 2026</span>
</div>
- <h3 style="font-size: 18px; font-weight: 700; color: var(--text); margin-top: 6px;">Nami Core Overhaul: SQLite Media Ledger, History Grid, Incremental Creator Sync &amp; Zero-Extension Cookie Bridge</h3>
+ <h3 style="font-size: 18px; font-weight: 700; color: var(--text); margin-top: 6px;">Platform Media Stability Patch: Queue Kind Refinement, Thumbnail Resolution, Unix Process Group Termination &amp; CPU Throttling</h3>
</div>
- <a href="https://github.com/OpenSelena/omniget/releases/tag/v0.16.0" target="_blank" rel="noopener" class="subtab-item" style="border: 1px solid var(--border); text-decoration: none;">
+ <a href="https://github.com/OpenSelena/omniget/releases/tag/v0.16.1" target="_blank" rel="noopener" class="subtab-item" style="border: 1px solid var(--border); text-decoration: none;">
<span>View Release on GitHub</span>
<svg class="icon icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
</a>
@@ -1970,14 +1970,19 @@
<div>
<h4 style="font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 8px;">
<svg class="icon icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>
- Nami 2.0 Core Upgrades
+ Bug Fixes &amp; Stability Patches
</h4>
<ul style="margin-left: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.6; display: grid; gap: 4px;">
- <li>Replaced volatile in-memory state with a transactional SQLite media ledger (<code>nami.db</code>) with automatic schema migration.</li>
- <li>Added dedicated 4th tab navigation for download history, with real-time search, platform filtering, and 2-phase disk sync.</li>
- <li>Implemented incremental creator pulls with early exit (<code>--abort &lt;N&gt;</code>) and humanized request jitter (1.2–2.8s).</li>
- <li>Added zero-extension cross-platform cookie extraction directly from Chrome, Edge, Brave, and Firefox SQLite stores.</li>
- <li>Injected <code>-o format=best</code> safeguard for synchronized audio on TikTok downloads.</li>
+ <li>Resolved queue item kind categorization so downloaded photos and carousels display photo indicators and badges instead of videos.</li>
+ <li>Restored missing photo thumbnails and creator username extraction for Instagram single and carousel posts.</li>
+ <li>Propagated Twitter photo URLs to thumbnails and guarded omnibox preview against infinite shimmer skeletons.</li>
+ <li>Added Unix process group allocation (<code>process_group(0)</code>) and direct PID kill to ensure Nami downloads stop reliably.</li>
+ <li>Throttled yt-dlp concurrent fragments to 4, limited ffmpeg threads to 2, and debounced omnibox metadata prefetching.</li>
+ <li>Added canonical redirect resolution for Threads <code>/share/</code> links.</li>
+ </ul>
+ </div>
+ </div>
+ </div>
</ul>
</div>
</div>
diff --git a/docs/installation/index.html b/docs/installation/index.html
index 839ca029..05badf5c 100644
--- a/docs/installation/index.html
+++ b/docs/installation/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
diff --git a/docs/mcp/index.html b/docs/mcp/index.html
index 33e23c16..1b004ce5 100644
--- a/docs/mcp/index.html
+++ b/docs/mcp/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
diff --git a/docs/nami/index.html b/docs/nami/index.html
index 2493fe76..149d06b9 100644
--- a/docs/nami/index.html
+++ b/docs/nami/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
diff --git a/docs/troubleshooting/index.html b/docs/troubleshooting/index.html
index 9c0485cb..22512270 100644
--- a/docs/troubleshooting/index.html
+++ b/docs/troubleshooting/index.html
@@ -1415,7 +1415,7 @@
<li>
<a href="../courses/" class="sidebar-link">
<span>36 Course Platforms</span>
- <span class="sidebar-tag">v0.16.0</span>
+ <span class="sidebar-tag">v0.16.1</span>
</a>
</li>
</ul>
diff --git a/package.json b/package.json
index 58cd0d2e..a9a240ec 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "omniget",
- "version": "0.16.0",
+ "version": "0.16.1",
"description": "",
"type": "module",
"packageManager": "[email protected]",
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 0ce5c7cc..207cb0ac 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -5047,7 +5047,7 @@ dependencies = [
[[package]]
name = "omniget"
-version = "0.16.0"
+version = "0.16.1"
dependencies = [
"aes 0.8.4",
"anyhow",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 9b73819c..3345b370 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -13,7 +13,7 @@ resolver = "2"
[package]
name = "omniget"
-version = "0.16.0"
+version = "0.16.1"
description = "OmniGet — Universal Downloader & Media Player"
authors = ["OpenSelena"]
edition = "2021"
diff --git a/src-tauri/omniget-core/src/core/ytdlp.rs b/src-tauri/omniget-core/src/core/ytdlp.rs
index 995f3029..05e8fae2 100644
--- a/src-tauri/omniget-core/src/core/ytdlp.rs
+++ b/src-tauri/omniget-core/src/core/ytdlp.rs
@@ -3347,6 +3347,11 @@ pub async fn download_video(
base_args.push("mp4".to_string());
}
+ if ffmpeg_available {
+ base_args.push("--postprocessor-args".to_string());
+ base_args.push("ffmpeg:-threads 2".to_string());
+ }
+
if let Some(ref_url) = referer {
base_args.push("--referer".to_string());
base_args.push(ref_url.to_string());
@@ -3401,7 +3406,7 @@ pub async fn download_video(
} else {
tuned_fragments
};
- let effective_fragments = effective_fragments.max(1);
+ let effective_fragments = effective_fragments.clamp(1, 4);
remember_concurrency(&tuner_host, effective_fragments);
base_args.push("-N".to_string());
base_args.push(effective_fragments.to_string());
diff --git a/src-tauri/omniget-core/src/platforms/instagram.rs b/src-tauri/omniget-core/src/platforms/instagram.rs
index d16e24df..f1a1cb12 100644
--- a/src-tauri/omniget-core/src/platforms/instagram.rs
+++ b/src-tauri/omniget-core/src/platforms/instagram.rs
@@ -705,11 +705,11 @@ impl PlatformDownloader for InstagramDownloader {
let filename_base = format!("instagram_{}", post_id);
let embed_result = self.request_embed(&post_id).await;
- let media = match embed_result {
- Ok(data) => Self::extract_media_from_embed(&data),
- Err(_embed_err) => match self.request_gql(&post_id).await {
+ let media = match &embed_result {
+ Ok(data) => Self::extract_media_from_embed(data),
+ Err(_) => match self.request_gql(&post_id).await {
Ok(data) => Self::extract_media_from_gql(&data),
- Err(_gql_err) => {
+ Err(_) => {
return self.fallback_ytdlp(url, &post_id).await;
}
},
@@ -740,6 +740,18 @@ impl PlatformDownloader for InstagramDownloader {
return self.fallback_ytdlp(url, &post_id).await;
}
+ let author = embed_result
+ .as_ref()
+ .ok()
+ .and_then(|d| {
+ d.pointer("/owner/username")
+ .or_else(|| d.pointer("/user/username"))
+ .or_else(|| d.get("author_name"))
+ .and_then(|v| v.as_str())
+ })
+ .unwrap_or("")
+ .to_string();
+
match media {
InstagramMedia::Single { url, is_video } => {
let (media_type, format) = if is_video {
@@ -748,12 +760,14 @@ impl PlatformDownloader for InstagramDownloader {
(MediaType::Photo, "jpg")
};
+ let thumbnail_url = Some(url.clone());
+
Ok(MediaInfo {
title: filename_base,
- author: String::new(),
+ author,
platform: "instagram".to_string(),
duration_seconds: None,
- thumbnail_url: None,
+ thumbnail_url,
available_qualities: vec![VideoQuality {
label: "original".to_string(),
width: 0,
@@ -766,6 +780,7 @@ impl PlatformDownloader for InstagramDownloader {
})
}
InstagramMedia::Carousel { items } => {
+ let thumbnail_url = items.first().map(|it| it.url.clone());
let qualities: Vec<VideoQuality> = items
.iter()
.enumerate()
@@ -783,10 +798,10 @@ impl PlatformDownloader for InstagramDownloader {
Ok(MediaInfo {
title: filename_base,
- author: String::new(),
+ author,
platform: "instagram".to_string(),
duration_seconds: None,
- thumbnail_url: None,
+ thumbnail_url,
available_qualities: qualities,
media_type: MediaType::Carousel,
file_size_bytes: None,
diff --git a/src-tauri/omniget-core/src/platforms/threads.rs b/src-tauri/omniget-core/src/platforms/threads.rs
index 4f2a6efc..4fab863d 100644
--- a/src-tauri/omniget-core/src/platforms/threads.rs
+++ b/src-tauri/omniget-core/src/platforms/threads.rs
@@ -15,6 +15,7 @@ const GOOGLEBOT_UA: &str =
pub struct ThreadsDownloader {
client: reqwest::Client,
+ redirect_client: reqwest::Client,
}
pub(crate) enum ThreadsMedia {
@@ -56,7 +57,37 @@ impl ThreadsDownloader {
}
let client = builder.build().unwrap_or_default();
- Self { client }
+
+ let redirect_client =
+ crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
+ .user_agent("curl/7.88.1")
+ .timeout(std::time::Duration::from_secs(120))
+ .connect_timeout(std::time::Duration::from_secs(15))
+ .build()
+ .unwrap_or_default();
+
+ Self {
+ client,
+ redirect_client,
+ }
+ }
+
+ pub fn extract_share_id(url: &str) -> Option<String> {
+ let parsed = url::Url::parse(url).ok()?;
+ let segments: Vec<&str> = parsed.path().split('/').filter(|s| !s.is_empty()).collect();
+ if segments.first() == Some(&"share") {
+ return segments.get(1).map(|s| s.to_string());
+ }
+ None
+ }
+
+ pub async fn resolve_share_link(&self, url: &str) -> anyhow::Result<String> {
+ let response = self.redirect_client.get(url).send().await?;
+ let final_url = response.url().to_string();
+ if final_url.contains("/share/") || final_url == url {
+ return Err(anyhow!("Could not resolve Threads share link"));
+ }
+ Ok(final_url)
}
/// Estrae il post ID da vari formati URL di Threads
@@ -379,13 +410,20 @@ impl PlatformDownloader for ThreadsDownloader {
}
async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {
- let post_id = Self::extract_post_id(url)
+ let canonical_url = if Self::extract_share_id(url).is_some() || url.contains("/share/") {
+ self.resolve_share_link(url)
+ .await
+ .unwrap_or_else(|_| url.to_string())
+ } else {
+ url.to_string()
+ };
+
+ let post_id = Self::extract_post_id(&canonical_url)
.ok_or_else(|| anyhow!("Could not extract post ID from Threads URL"))?;
let filename_base = format!("threads_{}", post_id);
- // Fetch della pagina e ricerca del post nel JSON bootstrap
- let post = self.fetch_post(url, &post_id).await?;
+ let post = self.fetch_post(&canonical_url, &post_id).await?;
// Per post share/repost il media vive in un contenitore annidato
let container = Self::resolve_media_container(&post);
@@ -588,6 +626,22 @@ mod tests {
);
}
+ #[test]
+ fn extract_share_id_from_share_url() {
+ assert_eq!(
+ ThreadsDownloader::extract_share_id("https://www.threads.com/share/F-xXv0jj3"),
+ Some("F-xXv0jj3".to_string())
+ );
+ assert_eq!(
+ ThreadsDownloader::extract_share_id("https://www.threads.net/share/EGBilPGDv?xmt=123"),
+ Some("EGBilPGDv".to_string())
+ );
+ assert_eq!(
+ ThreadsDownloader::extract_share_id("https://www.threads.com/@user/post/ABC123"),
+ None
+ );
+ }
+
#[test]
fn extract_post_id_rejects_invalid_url() {
let url = "https://www.threads.com/@user";
diff --git a/src-tauri/src/commands/nami/dispatcher.rs b/src-tauri/src/commands/nami/dispatcher.rs
index ef52389a..67f72499 100644
--- a/src-tauri/src/commands/nami/dispatcher.rs
+++ b/src-tauri/src/commands/nami/dispatcher.rs
@@ -109,6 +109,7 @@ pub fn kill_process_tree(pid: u32) {
let _ = Command::new("kill")
.args(["-9", &format!("-{}", pid)])
.output();
+ let _ = Command::new("kill").args(["-9", &pid.to_string()]).output();
}
}
@@ -594,6 +595,11 @@ fn run_process_stream(
use std::os::windows::process::CommandExt;
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW
}
+ #[cfg(unix)]
+ {
+ use std::os::unix::process::CommandExt;
+ cmd.process_group(0);
+ }
let mut child = cmd
.spawn()
diff --git a/src-tauri/src/core/queue.rs b/src-tauri/src/core/queue.rs
index 829d2a72..5e6396b1 100644
--- a/src-tauri/src/core/queue.rs
+++ b/src-tauri/src/core/queue.rs
@@ -336,7 +336,17 @@ impl DownloadQueue {
scheduled_at_ms: Option<u64>,
stop_at_ms: Option<u64>,
) {
- let computed_kind = Some(kind_from_platform(&platform));
+ let computed_kind = if let Some(ref mi) = media_info {
+ match mi.media_type {
+ omniget_core::models::media::MediaType::Photo
+ | omniget_core::models::media::MediaType::Carousel => Some(QueueKind::Image),
+ omniget_core::models::media::MediaType::Audio => Some(QueueKind::Audio),
+ omniget_core::models::media::MediaType::Video => Some(QueueKind::Video),
+ _ => Some(kind_from_platform(&platform)),
+ }
+ } else {
+ Some(kind_from_platform(&platform))
+ };
let item = QueueItem {
id,
url,
@@ -602,6 +612,71 @@ impl DownloadQueue {
item.file_size_bytes = file_size_bytes;
item.speed_bytes_per_sec = 0.0;
item.eta_seconds = None;
+ if let Some(ref path) = item.file_path {
+ let p = std::path::Path::new(path);
+ let ext = p
+ .extension()
+ .and_then(|e| e.to_str())
+ .unwrap_or("")
+ .to_lowercase();
+ if matches!(
+ ext.as_str(),
+ "jpg" | "jpeg" | "png" | "webp" | "heic" | "gif"
+ ) {
+ item.kind = Some(QueueKind::Image);
+ } else if matches!(
+ ext.as_str(),
+ "mp3" | "m4a" | "flac" | "wav" | "opus" | "ogg"
+ ) {
+ item.kind = Some(QueueKind::Audio);
+ } else if matches!(
+ ext.as_str(),
+ "mp4" | "mkv" | "webm" | "mov" | "avi" | "ts" | "m4v"
+ ) {
+ item.kind = Some(QueueKind::Video);
+ } else if p.is_dir() {
+ if let Ok(entries) = std::fs::read_dir(p) {
+ let mut has_img = false;
+ let mut has_vid = false;
+ for entry in entries.flatten() {
+ let e_ext = entry
+ .path()
+ .extension()
+ .and_then(|e| e.to_str())
+ .unwrap_or("")
+ .to_lowercase();
+ if matches!(
+ e_ext.as_str(),
+ "jpg" | "jpeg" | "png" | "webp" | "heic" | "gif"
+ ) {
+ has_img = true;
+ } else if matches!(
+ e_ext.as_str(),
+ "mp4" | "mkv" | "webm" | "mov" | "avi"
+ ) {
+ has_vid = true;
+ }
+ }
+ if has_img && !has_vid {
+ item.kind = Some(QueueKind::Image);
+ } else if has_vid {
+ item.kind = Some(QueueKind::Video);
+ }
+ }
+ }
+ }
+ if let Some(ref m) = item.media_info {
+ match m.media_type {
+ omniget_core::models::media::MediaType::Photo
+ | omniget_core::models::media::MediaType::Carousel => {
+ item.kind = Some(QueueKind::Image);
+ }
+ omniget_core::models::media::MediaType::Audio => {
+ item.kind = Some(QueueKind::Audio);
+ }
+ _ => {}
+ }
+ }
crate::core::recovery::remove(id);
if !item.external {
@@ -1433,6 +1508,19 @@ async fn spawn_download_inner(
};
item.file_count = Some(fc);
item.media_info = Some(info.clone());
+ match info.media_type {
+ omniget_core::models::media::MediaType::Photo
+ | omniget_core::models::media::MediaType::Carousel => {
+ item.kind = Some(QueueKind::Image);
+ }
+ omniget_core::models::media::MediaType::Audio => {
+ item.kind = Some(QueueKind::Audio);
+ }
+ omniget_core::models::media::MediaType::Video => {
+ item.kind = Some(QueueKind::Video);
+ }
+ _ => {}
+ }
}
q.get_state()
};
diff --git a/src-tauri/src/platforms/twitter/mod.rs b/src-tauri/src/platforms/twitter/mod.rs
index 5395da43..0a1d1961 100644
--- a/src-tauri/src/platforms/twitter/mod.rs
+++ b/src-tauri/src/platforms/twitter/mod.rs
@@ -33,6 +33,7 @@ struct TwitterMediaItem {
media_type: TwitterMediaType,
url: String,
extension: String,
+ thumbnail_url: Option<String>,
}
enum TwitterMediaType {
@@ -671,10 +672,12 @@ impl TwitterDownloader {
let raw = m.as_str().trim_end_matches([',', ';', ')', ']']);
if let Some((url, extension)) = Self::best_photo_url_from_str(raw) {
if seen.insert(url.clone()) {
+ let thumb = Some(url.clone());
items.push(TwitterMediaItem {
media_type: TwitterMediaType::Photo,
url,
extension,
+ thumbnail_url: thumb,
});
}
}
@@ -688,14 +691,21 @@ impl TwitterDownloader {
.filter_map(|m| match Self::infer_media_type(m)? {
TwitterMediaType::Photo => {
let (url, ext) = Self::best_photo_url(m)?;
+ let thumb = Some(url.clone());
Some(TwitterMediaItem {
media_type: TwitterMediaType::Photo,
url,
extension: ext,
+ thumbnail_url: thumb,
})
}
TwitterMediaType::Video => {
let url = Self::best_video_url(m)?;
+ let thumb = m
+ .get("media_url_https")
+ .or_else(|| m.get("media_url"))
+ .and_then(|v| v.as_str())
+ .map(|s| s.to_string());
let extension = if url.contains(".m3u8") || url.contains("mpegurl") {
"ytdlp"
} else {
@@ -705,14 +715,21 @@ impl TwitterDownloader {
media_type: TwitterMediaType::Video,
url,
extension: extension.to_string(),
+ thumbnail_url: thumb,
})
}
TwitterMediaType::AnimatedGif => {
let url = Self::best_video_url(m)?;
+ let thumb = m
+ .get("media_url_https")
+ .or_else(|| m.get("media_url"))
+ .and_then(|v| v.as_str())
+ .map(|s| s.to_string());
Some(TwitterMediaItem {
media_type: TwitterMediaType::AnimatedGif,
url,
extension: "mp4".to_string(),
+ thumbnail_url: thumb,
})
}
})
@@ -739,17 +756,25 @@ impl TwitterDownloader {
fn media_info_from_twitter_media(
filename_base: String,
+ author: String,
twitter_media: TwitterMedia,
) -> MediaInfo {
match twitter_media {
TwitterMedia::Single(item) => {
let media_type = Self::media_type_for_item(&item);
+ let thumbnail_url = item.thumbnail_url.clone().or_else(|| {
+ if matches!(item.media_type, TwitterMediaType::Photo) {
+ Some(item.url.clone())
+ } else {
+ None
+ }
+ });
MediaInfo {
title: filename_base,
- author: String::new(),
+ author,
platform: "twitter".to_string(),
duration_seconds: None,
- thumbnail_url: None,
+ thumbnail_url,
available_qualities: vec![VideoQuality {
label: "original".to_string(),
width: 0,
@@ -762,6 +787,15 @@ impl TwitterDownloader {
}
}
TwitterMedia::Multiple(items) => {
+ let thumbnail_url = items.first().and_then(|item| {
+ item.thumbnail_url.clone().or_else(|| {
+ if matches!(item.media_type, TwitterMediaType::Photo) {
+ Some(item.url.clone())
+ } else {
+ None
+ }
+ })
+ });
let qualities: Vec<VideoQuality> = items
.iter()
.enumerate()
@@ -776,10 +810,10 @@ impl TwitterDownloader {
MediaInfo {
title: filename_base,
- author: String::new(),
+ author,
platform: "twitter".to_string(),
duration_seconds: None,
- thumbnail_url: None,
+ thumbnail_url,
available_qualities: qualities,
media_type: MediaType::Carousel,
file_size_bytes: None,
@@ -1027,8 +1061,20 @@ impl TwitterDownloader {
let twitter_media = Self::parse_media_items(&media_items)?;
+ let author = if let Ok(parsed) = url::Url::parse(url) {
+ let segments: Vec<&str> = parsed.path().split('/').filter(|s| !s.is_empty()).collect();
+ if segments.len() >= 2 && segments[1] == "status" && segments[0] != "i" {
+ segments[0].to_string()
+ } else {
+ String::new()
+ }
+ } else {
+ String::new()
+ };
+
Ok(Self::media_info_from_twitter_media(
filename_base,
+ author,
twitter_media,
))
}
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index bc7f9b84..029f6c86 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "OmniGet",
- "version": "0.16.0",
+ "version": "0.16.1",
"identifier": "com.openselena.omniget",
"build": {
"beforeDevCommand": "pnpm dev",
diff --git a/src/components/omnibox/MediaPreview.svelte b/src/components/omnibox/MediaPreview.svelte
index a05d229a..46ca4c0d 100644
--- a/src/components/omnibox/MediaPreview.svelte
+++ b/src/components/omnibox/MediaPreview.svelte
@@ -16,7 +16,7 @@
{#if mediaPreview}
<div class="preview-container">
<div class="preview-thumbnail-wrapper">
- {#if imageLoading}
+ {#if imageLoading && mediaPreview.thumbnail_url}
<div class="preview-skeleton"></div>
{/if}
{#if mediaPreview.thumbnail_url}
@@ -29,6 +29,10 @@
onload={() => { imageLoading = false; }}
onerror={() => { imageLoading = false; }}
/>
+ {:else}
+ <div class="preview-fallback-art">
+ <img class="preview-art" src="/emoji/package.png" alt="" width="32" height="32" draggable="false" />
+ </div>
{/if}
</div>
<div class="preview-info">
@@ -67,6 +71,16 @@
animation: skeleton-shimmer 2s infinite;
}
+ .preview-fallback-art {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 120px;
+ height: 67.5px;
+ border-radius: calc(var(--border-radius) - 4px);
+ background: var(--button-elevated);
+ }
+
@keyframes skeleton-shimmer {
0%, 100% {
opacity: 0.6;
diff --git a/src/lib/stores/changelog-store.svelte.ts b/src/lib/stores/changelog-store.svelte.ts
index fbcbafc7..1ab97051 100644
--- a/src/lib/stores/changelog-store.svelte.ts
+++ b/src/lib/stores/changelog-store.svelte.ts
@@ -39,7 +39,7 @@ export async function initChangelog(): Promise<void> {
try {
currentVersion = await getVersion();
} catch {
- currentVersion = "0.16.0";
+ currentVersion = "0.16.1";
}
const lastSeen = localStorage.getItem(STORAGE_KEY);
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index e7b5eea5..5befcac5 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -441,7 +441,11 @@
if (result.supported) {
omniState = { kind: "detected", info: result };
if (!COURSE_PLATFORMS.has(result.platform)) {
- invoke("prefetch_media_info", { url: value }).catch(() => {});
+ setTimeout(() => {
+ if (url === value) {
+ invoke("prefetch_media_info", { url: value }).catch(() => {});
+ }
+ }, 400);
}
loadCookieAccounts(value);
if (result.content_type === "playlist") {