Skip to content

Commit 1a9bbbb

Browse files
committed
fix(metadata): map TrackTypeInput to TrackType
1 parent 61721f3 commit 1a9bbbb

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

anni-metadata/src/annim/query/album.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ impl From<&crate::model::TrackType> for TrackTypeInput {
203203

204204
impl From<TrackTypeInput> for crate::model::TrackType {
205205
fn from(value: TrackTypeInput) -> Self {
206-
value.into()
206+
match value {
207+
TrackTypeInput::Normal => crate::model::TrackType::Normal,
208+
TrackTypeInput::Instrumental => crate::model::TrackType::Instrumental,
209+
TrackTypeInput::Absolute => crate::model::TrackType::Absolute,
210+
TrackTypeInput::Drama => crate::model::TrackType::Drama,
211+
TrackTypeInput::Radio => crate::model::TrackType::Radio,
212+
TrackTypeInput::Vocal => crate::model::TrackType::Vocal,
213+
TrackTypeInput::Unknown => crate::model::TrackType::Normal,
214+
}
207215
}
208216
}

0 commit comments

Comments
 (0)