artifacts: implement musicbrainz tooling
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -10,7 +12,7 @@ pub struct BandcampQueryArgs {
|
||||
|
||||
impl Into<Artifact> for bandcamp::Artist {
|
||||
fn into(self) -> Artifact {
|
||||
Artifact::Artist(Artist { name: self.name, bio: self.bio, location: self.location, sources: vec![SourceID::Bandcamp(self.id)] })
|
||||
Artifact::Artist(Artist { name: self.name, bio: self.bio, location: self.location, sources: HashSet::from([SourceID::Bandcamp(self.id)])})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +24,7 @@ impl Into<Artifact> for bandcamp::Album {
|
||||
artist: self.band.name,
|
||||
credits: self.credits,
|
||||
release_date: Some(self.release_date),
|
||||
sources: vec!{SourceID::Bandcamp(self.id)}
|
||||
sources: HashSet::from([SourceID::Bandcamp(self.id)])
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user