Compare commits
2 Commits
36bd5061a4
...
v1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f164569e89 | ||
|
|
f4bdb85841 |
@@ -3,8 +3,3 @@
|
|||||||
A simple Youtube downloader.
|
A simple Youtube downloader.
|
||||||
|
|
||||||
Generated by Gemini CLI.
|
Generated by Gemini CLI.
|
||||||
|
|
||||||
## Problems
|
|
||||||
|
|
||||||
1. windows 上打包后运行命令会出现黑窗,而且还是会出现找不到 js-runtimes 的问题,但是 quickjs 是正常下载了
|
|
||||||
2. macos 上未测试
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "stream-capture",
|
"name": "stream-capture",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -3971,7 +3971,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stream-capture"
|
name = "stream-capture"
|
||||||
version = "0.1.0"
|
version = "1.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "stream-capture"
|
name = "stream-capture"
|
||||||
version = "0.1.0"
|
version = "1.0.1"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -308,17 +308,19 @@ pub async fn download_ffmpeg(app: &AppHandle) -> Result<PathBuf> {
|
|||||||
for asset in assets {
|
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())) {
|
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();
|
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());
|
download_url = Some(url.to_string());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if download_url.is_none() {
|
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 {
|
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 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());
|
download_url = Some(url.to_string());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -341,7 +343,8 @@ pub async fn download_ffmpeg(app: &AppHandle) -> Result<PathBuf> {
|
|||||||
if file.is_dir() { continue; }
|
if file.is_dir() { continue; }
|
||||||
let name = file.name().to_string();
|
let name = file.name().to_string();
|
||||||
let filename_only = name.split('/').last().unwrap_or("");
|
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))?;
|
let mut out_file = fs::File::create(bin_dir.join(filename_only))?;
|
||||||
std::io::copy(&mut file, &mut out_file)?;
|
std::io::copy(&mut file, &mut out_file)?;
|
||||||
found = true;
|
found = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "StreamCapture",
|
"productName": "StreamCapture",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"identifier": "top.volan.stream-capture",
|
"identifier": "top.volan.stream-capture",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"label": "main",
|
"label": "main",
|
||||||
"title": "流萤 - 视频下载 v1.0.0",
|
"title": "流萤 - 视频下载 v1.0.1",
|
||||||
"width": 1300,
|
"width": 1300,
|
||||||
"height": 900,
|
"height": 900,
|
||||||
"visible": false
|
"visible": false
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// filepath: src/App.vue
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from 'vue'
|
import { onMounted } from 'vue'
|
||||||
import { RouterView, RouterLink, useRoute } from 'vue-router'
|
import { RouterView, RouterLink, useRoute } from 'vue-router'
|
||||||
|
|||||||
Reference in New Issue
Block a user