Add option for manual input during fetch #219
6
src/external/musicbrainz/api/lookup.rs
vendored
6
src/external/musicbrainz/api/lookup.rs
vendored
@ -111,7 +111,7 @@ impl From<DeserializeLookupArtistResponse> for LookupArtistResponse {
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct LookupArtistResponseReleaseGroup {
|
||||
pub id: Mbid,
|
||||
pub title: String,
|
||||
pub title: AlbumId,
|
||||
pub first_release_date: AlbumDate,
|
||||
pub primary_type: AlbumPrimaryType,
|
||||
pub secondary_types: Vec<AlbumSecondaryType>,
|
||||
@ -131,7 +131,7 @@ impl From<DeserializeLookupArtistResponseReleaseGroup> for LookupArtistResponseR
|
||||
fn from(value: DeserializeLookupArtistResponseReleaseGroup) -> Self {
|
||||
LookupArtistResponseReleaseGroup {
|
||||
id: value.id.into(),
|
||||
title: value.title,
|
||||
title: value.title.into(),
|
||||
first_release_date: value.first_release_date.into(),
|
||||
primary_type: value.primary_type.into(),
|
||||
secondary_types: value.secondary_types.into_iter().map(Into::into).collect(),
|
||||
@ -217,7 +217,7 @@ mod tests {
|
||||
|
||||
let release_group = LookupArtistResponseReleaseGroup {
|
||||
id: de_release_group.id.0,
|
||||
title: de_release_group.title,
|
||||
title: de_release_group.title.into(),
|
||||
first_release_date: de_release_group.first_release_date.0,
|
||||
primary_type: de_release_group.primary_type.0,
|
||||
secondary_types: de_release_group
|
||||
|
@ -415,7 +415,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn select_manual_input() {
|
||||
fn select_manual_input_empty() {
|
||||
let matches =
|
||||
AppMachine::match_state(inner(music_hoard(vec![])), match_state(Some(album_match())));
|
||||
|
||||
@ -428,6 +428,6 @@ mod tests {
|
||||
let app = matches.select();
|
||||
|
||||
let input = app.mode().unwrap_input();
|
||||
input.confirm().unwrap_match();
|
||||
input.confirm().unwrap_error();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user