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:
2 files changed
+20
No files matched your search
@@ -2660,6 +2660,25 @@ pub async fn v2_library_list_folder_tracks(
|
||||
.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]
|
||||
pub async fn v2_library_add_folder(
|
||||
path: String,
|
||||
|
||||
@@ -1770,6 +1770,7 @@ pub fn run(qconnect_cli_override: Option<bool>) {
|
||||
commands_v2::v2_library_get_folders_with_metadata,
|
||||
commands_v2::v2_library_list_folder_children,
|
||||
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_cleanup_missing_files,
|
||||
commands_v2::v2_library_fetch_missing_artwork,
|
||||
|
||||
Reference in new issue
Block a user