For the database serde implementation use Mbid rather than MbRef #199

Merged
wojtek merged 3 commits from 198---for-the-database-serde-implementation-use-mbid-rather-than-mbref into main 2024-08-29 13:37:48 +02:00
5 changed files with 20 additions and 8 deletions
Showing only changes of commit be6970b9f0 - Show all commits

View File

@ -1,9 +1,12 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
use musichoard::{collection::musicbrainz::Mbid, external::musicbrainz::{ use musichoard::{
api::{lookup::LookupArtistRequest, MusicBrainzClient}, collection::musicbrainz::Mbid,
http::MusicBrainzHttp, external::musicbrainz::{
}}; api::{lookup::LookupArtistRequest, MusicBrainzClient},
http::MusicBrainzHttp,
},
};
use structopt::StructOpt; use structopt::StructOpt;
use uuid::Uuid; use uuid::Uuid;

View File

@ -5,7 +5,8 @@ use std::{num::ParseIntError, str::FromStr};
use musichoard::{ use musichoard::{
collection::{album::AlbumDate, musicbrainz::Mbid}, collection::{album::AlbumDate, musicbrainz::Mbid},
external::musicbrainz::{ external::musicbrainz::{
api::{search::SearchReleaseGroupRequest, MusicBrainzClient}, http::MusicBrainzHttp, api::{search::SearchReleaseGroupRequest, MusicBrainzClient},
http::MusicBrainzHttp,
}, },
}; };
use structopt::StructOpt; use structopt::StructOpt;

View File

@ -3,7 +3,9 @@ use std::collections::BTreeMap;
use serde::Serialize; use serde::Serialize;
use crate::{ use crate::{
collection::musicbrainz::Mbid, core::collection::{album::Album, artist::Artist, musicbrainz::IMusicBrainzRef, Collection}, external::database::serde::common::{SerdeAlbumPrimaryType, SerdeAlbumSecondaryType} collection::musicbrainz::Mbid,
core::collection::{album::Album, artist::Artist, musicbrainz::IMusicBrainzRef, Collection},
external::database::serde::common::{SerdeAlbumPrimaryType, SerdeAlbumSecondaryType},
}; };
#[derive(Debug, Serialize)] #[derive(Debug, Serialize)]

View File

@ -2,7 +2,10 @@ use serde::Deserialize;
use url::form_urlencoded; use url::form_urlencoded;
use crate::{ use crate::{
collection::{album::{AlbumDate, AlbumPrimaryType, AlbumSecondaryType}, musicbrainz::Mbid}, collection::{
album::{AlbumDate, AlbumPrimaryType, AlbumSecondaryType},
musicbrainz::Mbid,
},
external::musicbrainz::{ external::musicbrainz::{
api::{ api::{
Error, MusicBrainzClient, SerdeAlbumDate, SerdeAlbumPrimaryType, Error, MusicBrainzClient, SerdeAlbumDate, SerdeAlbumPrimaryType,

View File

@ -1,7 +1,10 @@
//! Module for interacting with the [MusicBrainz API](https://musicbrainz.org/doc/MusicBrainz_API). //! Module for interacting with the [MusicBrainz API](https://musicbrainz.org/doc/MusicBrainz_API).
use musichoard::{ use musichoard::{
collection::{album::{Album, AlbumDate}, musicbrainz::Mbid}, collection::{
album::{Album, AlbumDate},
musicbrainz::Mbid,
},
external::musicbrainz::{ external::musicbrainz::{
api::{ api::{
search::{SearchReleaseGroupRequest, SearchReleaseGroupResponseReleaseGroup}, search::{SearchReleaseGroupRequest, SearchReleaseGroupResponseReleaseGroup},