Minor nit

This commit is contained in:
Wojciech Kozlowski 2024-08-28 15:07:17 +02:00
parent 0e97f26b6e
commit 54dee15713

View File

@ -28,15 +28,17 @@ impl<Http: IMusicBrainzHttp> IMusicBrainz for MusicBrainz<Http> {
album: &Album,
) -> Result<Vec<Match<Album>>, Error> {
let mut request = SearchReleaseGroupRequest::default();
request
.arid(arid)
.release_group(&album.id.title)
.first_release_date(&album.date);
request.arid(arid);
if let Some(ref mbref) = album.musicbrainz {
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)?;
Ok(mb_response
.release_groups
.into_iter()