feat(backend): add bulk fetch for custom artist images
Add get_all_custom_artist_images() database method and v2_library_get_all_custom_artist_images command to support loading all custom artist image overrides at once for the global resolution store.
This commit is contained in:
3 files changed
+38
No files matched your search
@@ -4337,6 +4337,15 @@ pub async fn v2_library_get_artist_image(
|
||||
db.get_artist_image(&artist_name).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn v2_library_get_all_custom_artist_images(
|
||||
state: State<'_, LibraryState>,
|
||||
) -> Result<std::collections::HashMap<String, String>, String> {
|
||||
let guard = state.db.lock().await;
|
||||
let db = guard.as_ref().ok_or("No active session - please log in")?;
|
||||
db.get_all_custom_artist_images().map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn v2_create_artist_radio(
|
||||
artist_id: u64,
|
||||
|
||||
Reference in new issue
Block a user