feat: Tauri commands, concurrent refresh, download manager

Refresh fetches 8 channel feeds concurrently and mirrors thumbnails to
disk so the offline feed still renders. Downloads are capped at 2 and
shell out to yt-dlp with an absolute binary path, since GUI apps do not
inherit a login shell PATH.
This commit is contained in:
vincent
2026-08-29 02:28:26 +02:00
parent b724e9d56f
commit a30423e4b5
9 changed files with 651 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
//! Connectivity probing.
//!
//! The webview's `navigator.onLine` reports link state, not reachability — it
//! is true on a captive-portal wifi with no real internet, which is exactly the
//! situation this app exists for. So we actually talk to YouTube.
use std::time::Duration;
pub async fn is_online(client: &reqwest::Client) -> bool {
client
.head("https://www.youtube.com/")
.timeout(Duration::from_secs(5))
.send()
.await
.map(|r| r.status().is_success() || r.status().is_redirection())
.unwrap_or(false)
}