Minor nit
This commit is contained in:
parent
0e97f26b6e
commit
54dee15713
10
src/tui/lib/external/musicbrainz/mod.rs
vendored
10
src/tui/lib/external/musicbrainz/mod.rs
vendored
@ -28,15 +28,17 @@ impl<Http: IMusicBrainzHttp> IMusicBrainz for MusicBrainz<Http> {
|
|||||||
album: &Album,
|
album: &Album,
|
||||||
) -> Result<Vec<Match<Album>>, Error> {
|
) -> Result<Vec<Match<Album>>, Error> {
|
||||||
let mut request = SearchReleaseGroupRequest::default();
|
let mut request = SearchReleaseGroupRequest::default();
|
||||||
request
|
request.arid(arid);
|
||||||
.arid(arid)
|
|
||||||
.release_group(&album.id.title)
|
|
||||||
.first_release_date(&album.date);
|
|
||||||
if let Some(ref mbref) = album.musicbrainz {
|
if let Some(ref mbref) = album.musicbrainz {
|
||||||
request.rgid(mbref.mbid());
|
request.rgid(mbref.mbid());
|
||||||
|
} else {
|
||||||
|
request
|
||||||
|
.first_release_date(&album.date)
|
||||||
|
.release_group(&album.id.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mb_response = self.client.search_release_group(request)?;
|
let mb_response = self.client.search_release_group(request)?;
|
||||||
|
|
||||||
Ok(mb_response
|
Ok(mb_response
|
||||||
.release_groups
|
.release_groups
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
Loading…
Reference in New Issue
Block a user