From e065af4d7e962b2dd2c4bea674e4052538a79db5 Mon Sep 17 00:00:00 2001 From: vicrodh Date: Mon, 9 Mar 2026 14:08:07 -0600 Subject: [PATCH] revert: show precise birth/founding location in sidebar Restore "Born in: United Kingdom, Brixton" / "Founded in: United Kingdom, Leyton" in the artist sidebar. The scene discovery search uses country-level queries regardless, so the sidebar should show the precise MB location data. --- src-tauri/src/commands_v2.rs | 28 +------------------ .../components/views/ArtistDetailView.svelte | 2 +- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src-tauri/src/commands_v2.rs b/src-tauri/src/commands_v2.rs index 8b2c5eea1..a7a68dfb9 100644 --- a/src-tauri/src/commands_v2.rs +++ b/src-tauri/src/commands_v2.rs @@ -8784,33 +8784,7 @@ pub async fn v2_musicbrainz_get_artist_metadata( let artist = state.client.get_artist_with_relations(&mbid).await?; // Extract metadata using the location discovery module - let mut metadata = crate::musicbrainz::location_discovery::extract_metadata(&artist); - - // Resolve city → top-level subdivision for display - // Shows "Country, England" instead of "Country, Brixton" - if let Some(ref mut loc) = metadata.location { - if let Some(ref aid) = loc.area_id { - if matches!(loc.precision, crate::musicbrainz::LocationPrecision::City) { - match state.client.resolve_parent_subdivision(aid).await { - Ok(Some((subdivision_name, _))) => { - // Update display_name to Country, Subdivision - loc.display_name = if let Some(ref c) = loc.country { - format!("{}, {}", c, subdivision_name) - } else { - subdivision_name - }; - } - Ok(None) => { - // Already a subdivision or no resolution possible — keep as-is - } - Err(e) => { - log::warn!("Area resolution failed for {}: {}", aid, e); - // Keep original display_name - } - } - } - } - } + let metadata = crate::musicbrainz::location_discovery::extract_metadata(&artist); // Cache result { diff --git a/src/lib/components/views/ArtistDetailView.svelte b/src/lib/components/views/ArtistDetailView.svelte index 3e98dd1ea..db7fcddac 100644 --- a/src/lib/components/views/ArtistDetailView.svelte +++ b/src/lib/components/views/ArtistDetailView.svelte @@ -2708,7 +2708,7 @@ {#if mbMetadata.location}
- {$t('artist.from')} + {mbMetadata.artist_type === 'person' ? $t('artist.bornIn') : $t('artist.foundedIn')} {#if onLocationClick && mbMetadata.location.precision !== 'country' || (mbMetadata.location.city)}