Format
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user