Skip to content

Commit 76b9ec7

Browse files
committed
bump to v0.2.0 and fix yt-dlp updater
1 parent a6b56d3 commit 76b9ec7

6 files changed

Lines changed: 28 additions & 23 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tauri-app",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "0.2.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dlp-gui"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "A yt-dlp GUI Application"
55
authors = ["you"]
66
edition = "2021"
@@ -29,4 +29,3 @@ serde_json = "1"
2929
tauri-plugin-opener = "2"
3030
lazy_static = "1.4"
3131
reqwest = { version = "0.11", features = ["json"] }
32-
60.9 KB
Binary file not shown.

src-tauri/src/lib.rs

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -863,26 +863,32 @@ fn get_ytdlp_path() -> Result<PathBuf, String> {
863863
let exe_dir = exe_path.parent().ok_or("Failed to get exe directory")?;
864864

865865
let target = tauri::utils::platform::target_triple().map_err(|e| e.to_string())?;
866+
let ytdlp_simple = "yt-dlp.exe";
866867
let ytdlp_exe = format!("yt-dlp-{}.exe", target);
867-
868-
let ytdlp_full_path = exe_dir.join(&ytdlp_exe);
869-
870-
if ytdlp_full_path.exists() {
871-
Ok(ytdlp_full_path)
872-
} else {
873-
// Dev mode - check binaries folder
874-
let dev_path = std::path::PathBuf::from("src-tauri/binaries").join(&ytdlp_exe);
875-
if dev_path.exists() {
876-
Ok(dev_path.canonicalize().map_err(|e| e.to_string())?)
877-
} else {
878-
let alt_dev_path = std::path::PathBuf::from("binaries").join(&ytdlp_exe);
879-
if alt_dev_path.exists() {
880-
Ok(alt_dev_path.canonicalize().map_err(|e| e.to_string())?)
881-
} else {
882-
Err(format!("yt-dlp not found at {:?}", ytdlp_full_path))
883-
}
868+
869+
let possible_paths = vec![
870+
// Production/dev runtime output: Tauri strips the target triple.
871+
exe_dir.join(ytdlp_simple),
872+
exe_dir.join(&ytdlp_exe),
873+
exe_dir.join("binaries").join(ytdlp_simple),
874+
exe_dir.join("binaries").join(&ytdlp_exe),
875+
// Source tree during local development.
876+
std::path::PathBuf::from("src-tauri/binaries").join(ytdlp_simple),
877+
std::path::PathBuf::from("src-tauri/binaries").join(&ytdlp_exe),
878+
std::path::PathBuf::from("binaries").join(ytdlp_simple),
879+
std::path::PathBuf::from("binaries").join(&ytdlp_exe),
880+
];
881+
882+
for path in possible_paths {
883+
if path.exists() {
884+
return path.canonicalize().map_err(|e| e.to_string());
884885
}
885886
}
887+
888+
Err(format!(
889+
"yt-dlp not found. Checked runtime and bundled paths from {:?}",
890+
exe_dir
891+
))
886892
}
887893

888894
#[tauri::command]

src-tauri/tauri.conf.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "dlp-gui",
4-
"version": "0.1.0",
4+
"version": "0.2.0",
55
"identifier": "com.win10.dlp-gui",
66
"build": {
77
"beforeDevCommand": "bun run dev",
@@ -37,4 +37,4 @@
3737
"icons/icon.ico"
3838
]
3939
}
40-
}
40+
}

0 commit comments

Comments
 (0)