feat(library): expose v2_library_list_folder_tracks_recursive

Tauri wrapper for the qbz-library primitive added in the previous
commit. V2 cleanroom: direct call into qbz-library, no legacy
delegation. Registered in lib.rs alongside the existing folder-tree
commands.

cc
This commit is contained in:
vicrodh committed 2026-05-08 16:17:26 -06:00
1 parent 93a242e0d0
commit db2e0136d1
2 files changed
+20

No files matched your search

+19
View File
@@ -2660,6 +2660,25 @@ pub async fn v2_library_list_folder_tracks(
.map_err(|e| e.to_string()) .map_err(|e| e.to_string())
} }
#[tauri::command]
#[allow(non_snake_case)]
pub async fn v2_library_list_folder_tracks_recursive(
folderPath: String,
state: State<'_, LibraryState>,
) -> Result<Vec<LocalTrack>, String> {
log::info!(
"Command: v2_library_list_folder_tracks_recursive {}",
folderPath
);
let guard__ = state.db.lock().await;
let db = guard__
.as_ref()
.ok_or("No active session - please log in")?;
db.list_folder_tracks_recursive(&folderPath)
.map_err(|e| e.to_string())
}
#[tauri::command] #[tauri::command]
pub async fn v2_library_add_folder( pub async fn v2_library_add_folder(
path: String, path: String,
+1
View File
@@ -1770,6 +1770,7 @@ pub fn run(qconnect_cli_override: Option<bool>) {
commands_v2::v2_library_get_folders_with_metadata, commands_v2::v2_library_get_folders_with_metadata,
commands_v2::v2_library_list_folder_children, commands_v2::v2_library_list_folder_children,
commands_v2::v2_library_list_folder_tracks, commands_v2::v2_library_list_folder_tracks,
commands_v2::v2_library_list_folder_tracks_recursive,
commands_v2::v2_library_add_folder, commands_v2::v2_library_add_folder,
commands_v2::v2_library_cleanup_missing_files, commands_v2::v2_library_cleanup_missing_files,
commands_v2::v2_library_fetch_missing_artwork, commands_v2::v2_library_fetch_missing_artwork,