mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2025-12-19 02:42:58 +05:30
fix: yt-dlp not updating on windows msi install
This commit is contained in:
@@ -49,6 +49,11 @@
|
||||
"name": "pkexec",
|
||||
"cmd": "pkexec",
|
||||
"args": true
|
||||
},
|
||||
{
|
||||
"name": "powershell",
|
||||
"cmd": "powershell",
|
||||
"args": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user