This commit is contained in:
Julian Freeman
2025-12-02 09:11:59 -04:00
parent f4e264708a
commit a18065de93
23 changed files with 2909 additions and 183 deletions

View File

@@ -1,14 +1,27 @@
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
// filepath: src-tauri/src/lib.rs
mod ytdlp;
mod downloader;
mod storage;
mod commands;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.invoke_handler(tauri::generate_handler![greet])
.plugin(tauri_plugin_dialog::init())
.invoke_handler(tauri::generate_handler![
commands::init_ytdlp,
commands::update_ytdlp,
commands::get_ytdlp_version,
commands::fetch_metadata,
commands::start_download,
commands::get_settings,
commands::save_settings,
commands::get_history,
commands::clear_history,
commands::delete_history_item,
commands::open_in_explorer
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}