diff --git a/README.md b/README.md index b3c306c..98d0dee 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,3 @@ A simple Youtube downloader. Generated by Gemini CLI. - -## Problems - -1. windows 上打包后运行命令会出现黑窗,而且还是会出现找不到 js-runtimes 的问题,但是 quickjs 是正常下载了 -2. macos 上未测试 diff --git a/package.json b/package.json index de35c17..6a7d265 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stream-capture", "private": true, - "version": "1.0.0", + "version": "1.0.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 23178cb..204a811 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3971,7 +3971,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stream-capture" -version = "0.1.0" +version = "1.0.1" dependencies = [ "anyhow", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e8a09b9..0a787ba 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stream-capture" -version = "0.1.0" +version = "1.0.1" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/src-tauri/src/binary_manager.rs b/src-tauri/src/binary_manager.rs index 68c5162..8ee1ad6 100644 --- a/src-tauri/src/binary_manager.rs +++ b/src-tauri/src/binary_manager.rs @@ -308,17 +308,19 @@ pub async fn download_ffmpeg(app: &AppHandle) -> Result { for asset in assets { if let (Some(name), Some(url)) = (asset.get("name").and_then(|n| n.as_str()), asset.get("browser_download_url").and_then(|u| u.as_str())) { let lname = name.to_lowercase(); - if lname.contains("win64") && lname.ends_with(".zip") { + // Prefer GPL static build, avoid shared to get a single exe + if lname.contains("win64") && lname.contains("gpl") && !lname.contains("shared") && lname.ends_with(".zip") { download_url = Some(url.to_string()); break; } } } if download_url.is_none() { - // fallback: choose first zip asset + // fallback: choose first zip asset that is NOT shared if possible for asset in assets { if let (Some(url), Some(name)) = (asset.get("browser_download_url").and_then(|u| u.as_str()), asset.get("name").and_then(|n| n.as_str())) { - if name.to_lowercase().ends_with(".zip") { + let lname = name.to_lowercase(); + if lname.ends_with(".zip") && !lname.contains("shared") { download_url = Some(url.to_string()); break; } @@ -341,7 +343,8 @@ pub async fn download_ffmpeg(app: &AppHandle) -> Result { if file.is_dir() { continue; } let name = file.name().to_string(); let filename_only = name.split('/').last().unwrap_or(""); - if filename_only.eq_ignore_ascii_case("ffmpeg.exe") || filename_only.ends_with(".dll") { + // Only extract the executable, ignore DLLs + if filename_only.eq_ignore_ascii_case("ffmpeg.exe") { let mut out_file = fs::File::create(bin_dir.join(filename_only))?; std::io::copy(&mut file, &mut out_file)?; found = true; diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8537534..878bdd0 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": "StreamCapture", - "version": "1.0.0", + "productName": "流萤-视频下载", + "version": "1.0.1", "identifier": "top.volan.stream-capture", "build": { "beforeDevCommand": "pnpm dev", @@ -13,7 +13,7 @@ "windows": [ { "label": "main", - "title": "流萤 - 视频下载 v1.0.0", + "title": "流萤 - 视频下载 v1.0.1", "width": 1300, "height": 900, "visible": false diff --git a/src/App.vue b/src/App.vue index 0555b7e..fe89bd7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,3 @@ -// filepath: src/App.vue