fix: yt-dlp not updating on windows msi install

This commit is contained in:
2025-11-04 23:53:44 +05:30
parent 2ea008126e
commit 2ee778c5c6
4 changed files with 48 additions and 2 deletions

View File

@@ -49,6 +49,11 @@
"name": "pkexec",
"cmd": "pkexec",
"args": true
},
{
"name": "powershell",
"cmd": "powershell",
"args": true
}
]
},

View File

@@ -174,6 +174,16 @@ fn get_config_file_path() -> Result<String, String> {
}
}
#[tauri::command]
fn get_current_app_path() -> Result<String, String> {
let exe_path = std::env::current_exe().map_err(|e| e.to_string())?;
Ok(exe_path
.parent()
.ok_or("Failed to get parent directory")?
.to_string_lossy()
.into_owned())
}
#[tauri::command]
async fn update_config(
new_config: Config,
@@ -588,6 +598,7 @@ pub async fn run() {
reset_config,
get_config_file_path,
restart_websocket_server,
get_current_app_path,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");