This commit is contained in:
Connor Johnstone
2026-03-19 14:55:20 -04:00
parent 324c409db0
commit 3572956cde

View File

@@ -67,11 +67,13 @@ impl MusicBrainzClient {
let url = format!("{BASE_URL}/artist/{mbid}?inc=url-rels&fmt=json");
let resp: MbArtistFull = self.get_json(&url).await?;
let begin_year = resp.life_span
let begin_year = resp
.life_span
.and_then(|ls| ls.begin)
.and_then(|d| d.split('-').next().map(String::from));
let urls = resp.relations
let urls = resp
.relations
.unwrap_or_default()
.into_iter()
.filter_map(|rel| {