Add a library identifier to disambiguate clashes in the library #238

Merged
wojtek merged 16 commits from 231---differentiate-release-groups-with-same-title-but-different-type-clash into main 2025-01-02 15:50:55 +01:00
4 changed files with 7 additions and 11 deletions
Showing only changes of commit ba0519d250 - Show all commits

View File

@ -1,17 +1,14 @@
use std::{ use std::{
collections::HashMap, collections::HashMap,
fmt::{self, Debug, Display}, fmt::{self, Debug, Display},
mem,
}; };
use crate::core::collection::{ use crate::core::collection::{
album::Album, album::{Album, AlbumLibId},
merge::{Merge, MergeId}, merge::{Merge, MergeId},
musicbrainz::{MbArtistRef, MbRefOption}, musicbrainz::{MbArtistRef, MbRefOption},
}; };
use super::album::AlbumLibId;
/// An artist. /// An artist.
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub struct Artist { pub struct Artist {

View File

@ -14,12 +14,10 @@ use crate::{
Collection, Error as CollectionError, Collection, Error as CollectionError,
}, },
external::database::serde::common::{ external::database::serde::common::{
AlbumLibIdDef, SerdeAlbumPrimaryType, SerdeAlbumSecondaryType, AlbumLibIdDef, MbRefOptionDef, SerdeAlbumPrimaryType, SerdeAlbumSecondaryType,
}, },
}; };
use super::common::MbRefOptionDef;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
pub enum DeserializeDatabase { pub enum DeserializeDatabase {
V20250101(Vec<DeserializeArtist>), V20250101(Vec<DeserializeArtist>),

View File

@ -4,13 +4,14 @@ use url::form_urlencoded;
use crate::{ use crate::{
collection::musicbrainz::Mbid, collection::musicbrainz::Mbid,
external::musicbrainz::{ external::musicbrainz::{
api::{Error, MusicBrainzClient, MB_BASE_URL}, api::{
Error, MbArtistMeta, MbReleaseGroupMeta, MusicBrainzClient, SerdeMbArtistMeta,
SerdeMbReleaseGroupMeta, MB_BASE_URL,
},
IMusicBrainzHttp, IMusicBrainzHttp,
}, },
}; };
use super::{MbArtistMeta, MbReleaseGroupMeta, SerdeMbArtistMeta, SerdeMbReleaseGroupMeta};
impl<Http: IMusicBrainzHttp> MusicBrainzClient<Http> { impl<Http: IMusicBrainzHttp> MusicBrainzClient<Http> {
pub fn lookup_artist( pub fn lookup_artist(
&mut self, &mut self,

View File

@ -3,7 +3,7 @@ use std::collections::HashMap;
use musichoard::collection::{album::Album, artist::Artist}; use musichoard::collection::{album::Album, artist::Artist};
use ratatui::widgets::{ListState, Paragraph}; use ratatui::widgets::{ListState, Paragraph};
use super::display::UiDisplay; use crate::tui::ui::display::UiDisplay;
struct InfoOverlay; struct InfoOverlay;