feat(ui): add album cover context menu in AlbumDetailView

Right-click on album artwork shows context menu with:
- Add/Change/Remove custom album cover
- Open in browser
- Save as...

Also adds v2_save_image_url_to_file backend command.

cc
This commit is contained in:
vicrodh committed 2026-02-24 10:06:02 -06:00
1 parent cac07b92d7
commit 5f1d5a24ce
3 files changed
+199 -3

No files matched your search

+17
View File
@@ -4830,6 +4830,23 @@ pub async fn v2_library_get_all_custom_album_covers(
db.get_all_custom_album_covers().map_err(|e| e.to_string())
}
#[tauri::command]
pub async fn v2_save_image_url_to_file(
url: String,
dest_path: String,
) -> Result<(), String> {
let response = reqwest::get(&url)
.await
.map_err(|e| format!("Failed to download image: {}", e))?;
let bytes = response
.bytes()
.await
.map_err(|e| format!("Failed to read image data: {}", e))?;
std::fs::write(&dest_path, &bytes)
.map_err(|e| format!("Failed to save image: {}", e))?;
Ok(())
}
#[tauri::command]
pub async fn v2_create_artist_radio(
artist_id: u64,