//! MusicHoard - a music collection manager. use serde::{Deserialize, Serialize}; use uuid::Uuid; pub mod database; pub mod library; /// [MusicBrainz Identifier](https://musicbrainz.org/doc/MusicBrainz_Identifier) (MBID). pub type Mbid = Uuid; /// [Artist](https://musicbrainz.org/doc/Artist). #[derive(Debug, Deserialize, Serialize, PartialEq)] pub struct Artist { pub name: String, pub mbid: Option, } /// [Track](https://musicbrainz.org/doc/Track). #[derive(Debug, Deserialize, Serialize, PartialEq)] pub struct Track { pub number: u32, pub title: String, pub artist: Vec, pub mbid: Option, } /// [Release](https://musicbrainz.org/doc/Release). #[derive(Debug, Deserialize, Serialize, PartialEq)] pub struct Release { pub tracks: Vec, pub mbid: Option, } /// [Release group primary type](https://musicbrainz.org/doc/Release_Group/Type). #[derive(Debug, Deserialize, Serialize, PartialEq)] pub enum ReleaseGroupType { Album, Ep, Single, Other, } /// [Release group](https://musicbrainz.org/doc/Release_Group). #[derive(Debug, Deserialize, Serialize, PartialEq)] pub struct ReleaseGroup { pub r#type: ReleaseGroupType, pub title: String, pub artist: Vec, pub year: u32, pub mbid: Option, pub releases: Vec, }