artifacts: implement musicbrainz tooling

This commit is contained in:
2026-06-16 11:32:15 +02:00
parent ac6cb425ac
commit d69ba43a6b
7 changed files with 177 additions and 56 deletions
+4 -2
View File
@@ -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)])
})
}
}