From b705dc56a0f7a0d31e88458250c3beafab583dc5 Mon Sep 17 00:00:00 2001 From: aaday321 Date: Sun, 25 Jan 2026 03:07:48 -0800 Subject: [PATCH] fix: Added a 'path' payload to the FOLDER_ADDED_EVENT --- src-tauri/src/music/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/music/commands.rs b/src-tauri/src/music/commands.rs index a72e336..2ccf23e 100644 --- a/src-tauri/src/music/commands.rs +++ b/src-tauri/src/music/commands.rs @@ -116,10 +116,10 @@ pub fn get_position(state: State<'_, AppData>) -> std::time::Duration { #[tauri::command] pub fn add_folder(app: AppHandle, path: &str) -> Result<(), String> { - let pear = saved_directories::ActiveModel { + saved_directories::ActiveModel { path: Set(path.to_owned()), ..Default::default() // all other attributes are `NotSet` }; - app.emit("FOLDER_ADDED_EVENT", "").unwrap(); + app.emit("FOLDER_ADDED_EVENT", path.to_string()).unwrap(); Ok(()) } \ No newline at end of file -- 2.51.2