feat(library): expose v2_library_count_folder_tracks

Tauri wrapper for the qbz-library count helper.

cc
This commit is contained in:
vicrodh committed 2026-05-08 17:28:02 -06:00
1 parent 87fbc1bc4e
commit fb825587a4
2 files changed
+22

No files matched your search

+21
View File
@@ -2691,6 +2691,27 @@ pub async fn v2_library_list_folder_tracks_recursive(
.map_err(|e| e.to_string())
}
#[tauri::command]
#[allow(non_snake_case)]
pub async fn v2_library_count_folder_tracks(
folderPath: String,
excludeNetworkFolders: Option<bool>,
state: State<'_, LibraryState>,
) -> Result<u32, String> {
log::info!(
"Command: v2_library_count_folder_tracks {} (exclude_network={:?})",
folderPath,
excludeNetworkFolders
);
let guard__ = state.db.lock().await;
let db = guard__
.as_ref()
.ok_or("No active session - please log in")?;
db.count_folder_tracks_recursive(&folderPath, excludeNetworkFolders.unwrap_or(false))
.map_err(|e| e.to_string())
}
#[tauri::command]
pub async fn v2_library_add_folder(
path: String,