fix to artist unwatch/watch bug

This commit is contained in:
Connor Johnstone
2026-03-25 11:10:44 -04:00
parent 05ab6c0f3e
commit 2d6be1a22c
3 changed files with 13 additions and 2 deletions

View File

@@ -139,9 +139,13 @@ pub fn artist_page(props: &Props) -> Html {
</button>
}
} else {
// Watch All
// Watch All — prefer enrichment MBID over DB record (import may not have set it)
let artist_name = d.artist.name.clone();
let artist_mbid = d.artist.musicbrainz_id.clone();
let artist_mbid = d
.artist_info
.as_ref()
.and_then(|i| i.mbid.clone())
.or_else(|| d.artist.musicbrainz_id.clone());
let message = message.clone();
let error = error.clone();
let fetch = fetch.clone();

View File

@@ -83,6 +83,8 @@ pub struct FullArtistDetail {
pub struct ArtistInfoFe {
pub name: String,
#[serde(default)]
pub mbid: Option<String>,
#[serde(default)]
pub disambiguation: Option<String>,
#[serde(default)]
pub country: Option<String>,