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
14 changed files with 164 additions and 157 deletions
Showing only changes of commit 8667f6a473 - Show all commits

View File

@ -40,10 +40,19 @@ pub struct AlbumId {
pub lib_id: AlbumLibId,
}
impl AlbumId {
pub fn alike(&self, other: &AlbumId) -> bool {
let titles_alike = self.title == other.title;
let lib_id_alike =
self.lib_id.is_none() || other.lib_id.is_none() || (self.lib_id == other.lib_id);
titles_alike && lib_id_alike
}
}
/// Unique library identifier.
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
pub enum AlbumLibId {
Some(u32),
Value(u32),
Singleton,
None,
}
@ -259,11 +268,7 @@ impl Ord for AlbumMeta {
impl Merge for AlbumMeta {
fn merge_in_place(&mut self, other: Self) {
if !self.id.lib_id.is_none() && !other.id.lib_id.is_none() {
assert_eq!(self.id, other.id);
} else {
assert_eq!(self.id.title, other.id.title);
}
assert!(self.id.alike(&other.id));
self.seq = std::cmp::max(self.seq, other.seq);

View File

@ -61,7 +61,7 @@ impl Artist {
primary_albums: &mut [Album],
mut secondary_album: Album,
) -> Option<Album> {
if let lib_id @ AlbumLibId::Some(_) | lib_id @ AlbumLibId::Singleton =
if let lib_id @ AlbumLibId::Value(_) | lib_id @ AlbumLibId::Singleton =
secondary_album.meta.id.lib_id
{
if let Some(ref mut primary_album) = primary_albums

View File

@ -98,14 +98,6 @@ where
T: MergeId<Id = ID> + Merge + Ord,
IT: IntoIterator<Item = T>,
{
pub fn merge_iter(primary: IT, secondary: IT) -> Vec<T> {
let primary = primary
.into_iter()
.map(|item| (item.id().clone(), item))
.collect();
Self::merge(primary, secondary)
}
pub fn merge(mut primary: HashMap<ID, T>, secondary: IT) -> Vec<T> {
for secondary_item in secondary {
if let Some(ref mut primary_item) = primary.get_mut(secondary_item.id()) {

View File

@ -177,6 +177,7 @@ mod tests {
let exe_err = Error::Executor(String::from("Executor"));
let io_err: Error = io::Error::new(io::ErrorKind::Interrupted, "Interrupted").into();
let inv_err = Error::Invalid(String::from("Invalid"));
let bool_err: Error = "f".parse::<bool>().unwrap_err().into();
let int_err: Error = "five".parse::<u32>().unwrap_err().into();
#[allow(invalid_from_utf8)]
let utf_err: Error = std::str::from_utf8(b"\xe2\x28\xa1").unwrap_err().into();
@ -184,12 +185,14 @@ mod tests {
assert!(!exe_err.to_string().is_empty());
assert!(!io_err.to_string().is_empty());
assert!(!inv_err.to_string().is_empty());
assert!(!bool_err.to_string().is_empty());
assert!(!int_err.to_string().is_empty());
assert!(!utf_err.to_string().is_empty());
assert!(!format!("{:?}", exe_err).is_empty());
assert!(!format!("{:?}", io_err).is_empty());
assert!(!format!("{:?}", inv_err).is_empty());
assert!(!format!("{:?}", bool_err).is_empty());
assert!(!format!("{:?}", int_err).is_empty());
assert!(!format!("{:?}", utf_err).is_empty());
}

View File

@ -14,7 +14,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title a.a"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 1,
track_title: String::from("track a.a.1"),
track_artist: vec![String::from("artist a.a.1")],
@ -28,7 +28,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title a.a"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 2,
track_title: String::from("track a.a.2"),
track_artist: vec![
@ -45,7 +45,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title a.a"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 3,
track_title: String::from("track a.a.3"),
track_artist: vec![String::from("artist a.a.3")],
@ -59,7 +59,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title a.a"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 4,
track_title: String::from("track a.a.4"),
track_artist: vec![String::from("artist a.a.4")],
@ -73,7 +73,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 4,
album_day: 0,
album_title: String::from("album_title a.b"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 1,
track_title: String::from("track a.b.1"),
track_artist: vec![String::from("artist a.b.1")],
@ -87,7 +87,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 4,
album_day: 0,
album_title: String::from("album_title a.b"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 2,
track_title: String::from("track a.b.2"),
track_artist: vec![String::from("artist a.b.2")],
@ -101,7 +101,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 6,
album_day: 6,
album_title: String::from("album_title b.a"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 1,
track_title: String::from("track b.a.1"),
track_artist: vec![String::from("artist b.a.1")],
@ -115,7 +115,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 6,
album_day: 6,
album_title: String::from("album_title b.a"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 2,
track_title: String::from("track b.a.2"),
track_artist: vec![
@ -132,7 +132,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.b"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 1,
track_title: String::from("track b.b.1"),
track_artist: vec![String::from("artist b.b.1")],
@ -146,7 +146,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.b"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 2,
track_title: String::from("track b.b.2"),
track_artist: vec![
@ -163,7 +163,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.c"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 1,
track_title: String::from("track b.c.1"),
track_artist: vec![String::from("artist b.c.1")],
@ -177,7 +177,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.c"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 2,
track_title: String::from("track b.c.2"),
track_artist: vec![
@ -194,7 +194,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.d"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 1,
track_title: String::from("track b.d.1"),
track_artist: vec![String::from("artist b.d.1")],
@ -208,7 +208,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title b.d"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 2,
track_title: String::from("track b.d.2"),
track_artist: vec![
@ -225,7 +225,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title c.a"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 1,
track_title: String::from("track c.a.1"),
track_artist: vec![String::from("artist c.a.1")],
@ -239,7 +239,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title c.a"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 2,
track_title: String::from("track c.a.2"),
track_artist: vec![
@ -256,7 +256,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title c.b"),
album_lib_id: AlbumLibId::Some(8),
album_lib_id: AlbumLibId::Value(8),
track_number: 1,
track_title: String::from("track c.b.1"),
track_artist: vec![String::from("artist c.b.1")],
@ -270,7 +270,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title c.b"),
album_lib_id: AlbumLibId::Some(8),
album_lib_id: AlbumLibId::Value(8),
track_number: 2,
track_title: String::from("track c.b.2"),
track_artist: vec![
@ -287,7 +287,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title d.a"),
album_lib_id: AlbumLibId::Some(9),
album_lib_id: AlbumLibId::Value(9),
track_number: 1,
track_title: String::from("track d.a.1"),
track_artist: vec![String::from("artist d.a.1")],
@ -301,7 +301,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title d.a"),
album_lib_id: AlbumLibId::Some(9),
album_lib_id: AlbumLibId::Value(9),
track_number: 2,
track_title: String::from("track d.a.2"),
track_artist: vec![
@ -318,7 +318,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title d.b"),
album_lib_id: AlbumLibId::Some(10),
album_lib_id: AlbumLibId::Value(10),
track_number: 1,
track_title: String::from("track d.b.1"),
track_artist: vec![String::from("artist d.b.1")],
@ -332,7 +332,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("album_title d.b"),
album_lib_id: AlbumLibId::Some(10),
album_lib_id: AlbumLibId::Value(10),
track_number: 2,
track_title: String::from("track d.b.2"),
track_artist: vec![

View File

@ -11,12 +11,12 @@ pub static DATABASE_JSON: &str = "{\
},\
\"albums\":[\
{\
\"title\":\"album_title a.a\",\"lib_id\":{\"Some\":1},\"seq\":1,\
\"title\":\"album_title a.a\",\"lib_id\":{\"Value\":1},\"seq\":1,\
\"musicbrainz\":{\"Some\":\"00000000-0000-0000-0000-000000000000\"},\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title a.b\",\"lib_id\":{\"Some\":2},\"seq\":1,\"musicbrainz\":\"None\",\
\"title\":\"album_title a.b\",\"lib_id\":{\"Value\":2},\"seq\":1,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
}\
]\
@ -35,21 +35,21 @@ pub static DATABASE_JSON: &str = "{\
},\
\"albums\":[\
{\
\"title\":\"album_title b.a\",\"lib_id\":{\"Some\":3},\"seq\":1,\"musicbrainz\":\"None\",\
\"title\":\"album_title b.a\",\"lib_id\":{\"Value\":3},\"seq\":1,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title b.b\",\"lib_id\":{\"Some\":4},\"seq\":3,\
\"title\":\"album_title b.b\",\"lib_id\":{\"Value\":4},\"seq\":3,\
\"musicbrainz\":{\"Some\":\"11111111-1111-1111-1111-111111111111\"},\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title b.c\",\"lib_id\":{\"Some\":5},\"seq\":2,\
\"title\":\"album_title b.c\",\"lib_id\":{\"Value\":5},\"seq\":2,\
\"musicbrainz\":{\"Some\":\"11111111-1111-1111-1111-111111111112\"},\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title b.d\",\"lib_id\":{\"Some\":6},\"seq\":4,\"musicbrainz\":\"None\",\
\"title\":\"album_title b.d\",\"lib_id\":{\"Value\":6},\"seq\":4,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
}\
]\
@ -61,11 +61,11 @@ pub static DATABASE_JSON: &str = "{\
\"properties\":{},\
\"albums\":[\
{\
\"title\":\"album_title c.a\",\"lib_id\":{\"Some\":7},\"seq\":0,\"musicbrainz\":\"None\",\
\"title\":\"album_title c.a\",\"lib_id\":{\"Value\":7},\"seq\":0,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title c.b\",\"lib_id\":{\"Some\":8},\"seq\":0,\"musicbrainz\":\"None\",\
\"title\":\"album_title c.b\",\"lib_id\":{\"Value\":8},\"seq\":0,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
}\
]\
@ -77,11 +77,11 @@ pub static DATABASE_JSON: &str = "{\
\"properties\":{},\
\"albums\":[\
{\
\"title\":\"album_title d.a\",\"lib_id\":{\"Some\":9},\"seq\":0,\"musicbrainz\":\"None\",\
\"title\":\"album_title d.a\",\"lib_id\":{\"Value\":9},\"seq\":0,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
},\
{\
\"title\":\"album_title d.b\",\"lib_id\":{\"Some\":10},\"seq\":0,\"musicbrainz\":\"None\",\
\"title\":\"album_title d.b\",\"lib_id\":{\"Value\":10},\"seq\":0,\"musicbrainz\":\"None\",\
\"primary_type\":\"Album\",\"secondary_types\":[]\
}\
]\

View File

@ -8,7 +8,7 @@ use crate::{
#[derive(Debug, Deserialize, Serialize)]
#[serde(remote = "AlbumLibId")]
pub enum AlbumLibIdDef {
Some(u32),
Value(u32),
Singleton,
None,
}

View File

@ -167,7 +167,7 @@ impl<BLE: IBeetsLibraryExecutor> BeetsLibrary<BLE> {
let album_title = split[6].to_string();
let album_lib_id = match singleton {
true => AlbumLibId::Singleton,
false => AlbumLibId::Some(split[7].parse::<u32>()?),
false => AlbumLibId::Value(split[7].parse::<u32>()?),
};
let track_number = split[8].parse::<u32>()?;
let track_title = split[9].to_string();

View File

@ -28,7 +28,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title a.a".to_string(),
lib_id: AlbumLibId::Some(1),
lib_id: AlbumLibId::Value(1),
},
date: 1998.into(),
seq: AlbumSeq(1),
@ -94,7 +94,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title a.b".to_string(),
lib_id: AlbumLibId::Some(2),
lib_id: AlbumLibId::Value(2),
},
date: (2015, 4).into(),
seq: AlbumSeq(1),
@ -162,7 +162,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.a".to_string(),
lib_id: AlbumLibId::Some(3),
lib_id: AlbumLibId::Value(3),
},
date: (2003, 6, 6).into(),
seq: AlbumSeq(1),
@ -204,7 +204,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.b".to_string(),
lib_id: AlbumLibId::Some(4),
lib_id: AlbumLibId::Value(4),
},
date: 2008.into(),
seq: AlbumSeq(3),
@ -248,7 +248,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.c".to_string(),
lib_id: AlbumLibId::Some(5),
lib_id: AlbumLibId::Value(5),
},
date: 2009.into(),
seq: AlbumSeq(2),
@ -292,7 +292,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.d".to_string(),
lib_id: AlbumLibId::Some(6),
lib_id: AlbumLibId::Value(6),
},
date: 2015.into(),
seq: AlbumSeq(4),
@ -348,7 +348,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title c.a".to_string(),
lib_id: AlbumLibId::Some(7),
lib_id: AlbumLibId::Value(7),
},
date: 1985.into(),
seq: AlbumSeq(0),
@ -390,7 +390,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title c.b".to_string(),
lib_id: AlbumLibId::Some(8),
lib_id: AlbumLibId::Value(8),
},
date: 2018.into(),
seq: AlbumSeq(0),
@ -446,7 +446,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title d.a".to_string(),
lib_id: AlbumLibId::Some(9),
lib_id: AlbumLibId::Value(9),
},
date: 1995.into(),
seq: AlbumSeq(0),
@ -488,7 +488,7 @@ macro_rules! full_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title d.b".to_string(),
lib_id: AlbumLibId::Some(10),
lib_id: AlbumLibId::Value(10),
},
date: 2028.into(),
seq: AlbumSeq(0),

View File

@ -18,7 +18,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title a.a".to_string(),
lib_id: AlbumLibId::Some(1),
lib_id: AlbumLibId::Value(1),
},
date: 1998.into(),
seq: AlbumSeq(0),
@ -78,7 +78,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title a.b".to_string(),
lib_id: AlbumLibId::Some(2),
lib_id: AlbumLibId::Value(2),
},
date: (2015, 4).into(),
seq: AlbumSeq(0),
@ -127,7 +127,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.a".to_string(),
lib_id: AlbumLibId::Some(3),
lib_id: AlbumLibId::Value(3),
},
date: (2003, 6, 6).into(),
seq: AlbumSeq(0),
@ -165,7 +165,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.b".to_string(),
lib_id: AlbumLibId::Some(4),
lib_id: AlbumLibId::Value(4),
},
date: 2008.into(),
seq: AlbumSeq(0),
@ -203,7 +203,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.c".to_string(),
lib_id: AlbumLibId::Some(5),
lib_id: AlbumLibId::Value(5),
},
date: 2009.into(),
seq: AlbumSeq(0),
@ -241,7 +241,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title b.d".to_string(),
lib_id: AlbumLibId::Some(6),
lib_id: AlbumLibId::Value(6),
},
date: 2015.into(),
seq: AlbumSeq(0),
@ -293,7 +293,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title c.a".to_string(),
lib_id: AlbumLibId::Some(7),
lib_id: AlbumLibId::Value(7),
},
date: 1985.into(),
seq: AlbumSeq(0),
@ -331,7 +331,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title c.b".to_string(),
lib_id: AlbumLibId::Some(8),
lib_id: AlbumLibId::Value(8),
},
date: 2018.into(),
seq: AlbumSeq(0),
@ -383,7 +383,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title d.a".to_string(),
lib_id: AlbumLibId::Some(9),
lib_id: AlbumLibId::Value(9),
},
date: 1995.into(),
seq: AlbumSeq(0),
@ -421,7 +421,7 @@ macro_rules! library_collection {
meta: AlbumMeta {
id: AlbumId {
title: "album_title d.b".to_string(),
lib_id: AlbumLibId::Some(10),
lib_id: AlbumLibId::Value(10),
},
date: 2028.into(),
seq: AlbumSeq(0),

View File

@ -23,7 +23,7 @@ impl UiDisplay {
pub fn display_album_lib_id(lib_id: &AlbumLibId) -> String {
match lib_id {
AlbumLibId::Some(val) => val.to_string(),
AlbumLibId::Value(val) => val.to_string(),
AlbumLibId::Singleton => "Singleton".to_string(),
AlbumLibId::None => "None".to_string(),
}
@ -205,6 +205,13 @@ mod tests {
);
}
#[test]
fn display_album_lib_id() {
assert_eq!(UiDisplay::display_album_lib_id(&AlbumLibId::Value(5)), "5");
assert_eq!(UiDisplay::display_album_lib_id(&AlbumLibId::Singleton), "Singleton");
assert_eq!(UiDisplay::display_album_lib_id(&AlbumLibId::None), "None");
}
#[test]
fn display_date() {
let date: AlbumDate = 1990.into();

View File

@ -1 +1 @@
{"V20250101":[{"name":"Аркона","sort":"Arkona","musicbrainz":{"Some":"baad262d-55ef-427a-83c7-f7530964f212"},"properties":{"Bandcamp":["https://arkonamoscow.bandcamp.com/"],"MusicButler":["https://www.musicbutler.io/artist-page/283448581"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/arkona/download-streaming-albums"]},"albums":[{"title":"Slovo","lib_id":{"Some":7},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Eluveitie","sort":null,"musicbrainz":{"Some":"8000598a-5edb-401c-8e6d-36b167feaf38"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/269358403"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/eluveitie/download-streaming-albums"]},"albums":[{"title":"Vên [rerecorded]","lib_id":{"Some":1},"seq":0,"musicbrainz":"None","primary_type":"Ep","secondary_types":[]},{"title":"Slania","lib_id":{"Some":2},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Frontside","sort":null,"musicbrainz":{"Some":"3a901353-fccd-4afd-ad01-9c03f451b490"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/826588800"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/frontside/download-streaming-albums"]},"albums":[{"title":"…nasze jest królestwo, potęga i chwała na wieki…","lib_id":{"Some":3},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Heavens Basement","sort":"Heavens Basement","musicbrainz":{"Some":"c2c4d56a-d599-4a18-bd2f-ae644e2198cc"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/291158685"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/heaven-s-basement/download-streaming-albums"]},"albums":[{"title":"Paper Plague","lib_id":"Singleton","seq":0,"musicbrainz":"None","primary_type":null,"secondary_types":[]},{"title":"Unbreakable","lib_id":{"Some":4},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Metallica","sort":null,"musicbrainz":{"Some":"65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/3996865"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/metallica/download-streaming-albums"]},"albums":[{"title":"Ride the Lightning","lib_id":{"Some":5},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]},{"title":"S&M","lib_id":{"Some":6},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":["Live"]}]}]}
{"V20250101":[{"name":"Аркона","sort":"Arkona","musicbrainz":{"Some":"baad262d-55ef-427a-83c7-f7530964f212"},"properties":{"Bandcamp":["https://arkonamoscow.bandcamp.com/"],"MusicButler":["https://www.musicbutler.io/artist-page/283448581"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/arkona/download-streaming-albums"]},"albums":[{"title":"Slovo","lib_id":{"Value":7},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Eluveitie","sort":null,"musicbrainz":{"Some":"8000598a-5edb-401c-8e6d-36b167feaf38"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/269358403"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/eluveitie/download-streaming-albums"]},"albums":[{"title":"Vên [rerecorded]","lib_id":{"Value":1},"seq":0,"musicbrainz":"None","primary_type":"Ep","secondary_types":[]},{"title":"Slania","lib_id":{"Value":2},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Frontside","sort":null,"musicbrainz":{"Some":"3a901353-fccd-4afd-ad01-9c03f451b490"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/826588800"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/frontside/download-streaming-albums"]},"albums":[{"title":"…nasze jest królestwo, potęga i chwała na wieki…","lib_id":{"Value":3},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Heavens Basement","sort":"Heavens Basement","musicbrainz":{"Some":"c2c4d56a-d599-4a18-bd2f-ae644e2198cc"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/291158685"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/heaven-s-basement/download-streaming-albums"]},"albums":[{"title":"Paper Plague","lib_id":"Singleton","seq":0,"musicbrainz":"None","primary_type":null,"secondary_types":[]},{"title":"Unbreakable","lib_id":{"Value":4},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]}]},{"name":"Metallica","sort":null,"musicbrainz":{"Some":"65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab"},"properties":{"MusicButler":["https://www.musicbutler.io/artist-page/3996865"],"Qobuz":["https://www.qobuz.com/nl-nl/interpreter/metallica/download-streaming-albums"]},"albums":[{"title":"Ride the Lightning","lib_id":{"Value":5},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":[]},{"title":"S&M","lib_id":{"Value":6},"seq":0,"musicbrainz":"None","primary_type":"Album","secondary_types":["Live"]}]}]}

View File

@ -14,7 +14,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 1,
track_title: String::from("Az"),
track_artist: vec![String::from("Аркона")],
@ -28,7 +28,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 2,
track_title: String::from("Arkaim"),
track_artist: vec![String::from("Аркона")],
@ -42,7 +42,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 3,
track_title: String::from("Bolno mne"),
track_artist: vec![String::from("Аркона")],
@ -56,7 +56,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 4,
track_title: String::from("Leshiy"),
track_artist: vec![String::from("Аркона")],
@ -70,7 +70,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 5,
track_title: String::from("Zakliatie"),
track_artist: vec![String::from("Аркона")],
@ -84,7 +84,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 6,
track_title: String::from("Predok"),
track_artist: vec![String::from("Аркона")],
@ -98,7 +98,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 7,
track_title: String::from("Nikogda"),
track_artist: vec![String::from("Аркона")],
@ -112,7 +112,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 8,
track_title: String::from("Tam za tumanami"),
track_artist: vec![String::from("Аркона")],
@ -126,7 +126,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 9,
track_title: String::from("Potomok"),
track_artist: vec![String::from("Аркона")],
@ -140,7 +140,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 10,
track_title: String::from("Slovo"),
track_artist: vec![String::from("Аркона")],
@ -154,7 +154,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 11,
track_title: String::from("Odna"),
track_artist: vec![String::from("Аркона")],
@ -168,7 +168,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 12,
track_title: String::from("Vo moiom sadochke…"),
track_artist: vec![String::from("Аркона")],
@ -182,7 +182,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 13,
track_title: String::from("Stenka na stenku"),
track_artist: vec![String::from("Аркона")],
@ -196,7 +196,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slovo"),
album_lib_id: AlbumLibId::Some(7),
album_lib_id: AlbumLibId::Value(7),
track_number: 14,
track_title: String::from("Zimushka"),
track_artist: vec![String::from("Аркона")],
@ -210,7 +210,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 1,
track_title: String::from("Verja Urit an Bitus"),
track_artist: vec![String::from("Eluveitie")],
@ -224,7 +224,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 2,
track_title: String::from("Uis Elveti"),
track_artist: vec![String::from("Eluveitie")],
@ -238,7 +238,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 3,
track_title: String::from("Ôrô"),
track_artist: vec![String::from("Eluveitie")],
@ -252,7 +252,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 4,
track_title: String::from("Lament"),
track_artist: vec![String::from("Eluveitie")],
@ -266,7 +266,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 5,
track_title: String::from("Druid"),
track_artist: vec![String::from("Eluveitie")],
@ -280,7 +280,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Vên [rerecorded]"),
album_lib_id: AlbumLibId::Some(1),
album_lib_id: AlbumLibId::Value(1),
track_number: 6,
track_title: String::from("Jêzaïg"),
track_artist: vec![String::from("Eluveitie")],
@ -294,7 +294,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 1,
track_title: String::from("Samon"),
track_artist: vec![String::from("Eluveitie")],
@ -308,7 +308,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 2,
track_title: String::from("Primordial Breath"),
track_artist: vec![String::from("Eluveitie")],
@ -322,7 +322,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 3,
track_title: String::from("Inis Mona"),
track_artist: vec![String::from("Eluveitie")],
@ -336,7 +336,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 4,
track_title: String::from("Gray Sublime Archon"),
track_artist: vec![String::from("Eluveitie")],
@ -350,7 +350,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 5,
track_title: String::from("Anagantios"),
track_artist: vec![String::from("Eluveitie")],
@ -364,7 +364,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 6,
track_title: String::from("Bloodstained Ground"),
track_artist: vec![String::from("Eluveitie")],
@ -378,7 +378,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 7,
track_title: String::from("The Somber Lay"),
track_artist: vec![String::from("Eluveitie")],
@ -392,7 +392,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 8,
track_title: String::from("Slanias Song"),
track_artist: vec![String::from("Eluveitie")],
@ -406,7 +406,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 9,
track_title: String::from("Giamonios"),
track_artist: vec![String::from("Eluveitie")],
@ -420,7 +420,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 10,
track_title: String::from("Tarvos"),
track_artist: vec![String::from("Eluveitie")],
@ -434,7 +434,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 11,
track_title: String::from("Calling the Rain"),
track_artist: vec![String::from("Eluveitie")],
@ -448,7 +448,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Slania"),
album_lib_id: AlbumLibId::Some(2),
album_lib_id: AlbumLibId::Value(2),
track_number: 12,
track_title: String::from("Elembivos"),
track_artist: vec![String::from("Eluveitie")],
@ -462,7 +462,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 1,
track_title: String::from("Intro = Chaos"),
track_artist: vec![String::from("Frontside")],
@ -476,7 +476,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 2,
track_title: String::from("Modlitwa"),
track_artist: vec![String::from("Frontside")],
@ -490,7 +490,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 3,
track_title: String::from("Długa droga z piekła"),
track_artist: vec![String::from("Frontside")],
@ -504,7 +504,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 4,
track_title: String::from("Synowie ognia"),
track_artist: vec![String::from("Frontside")],
@ -518,7 +518,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 5,
track_title: String::from("1902"),
track_artist: vec![String::from("Frontside")],
@ -532,7 +532,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 6,
track_title: String::from("Krew za krew"),
track_artist: vec![String::from("Frontside")],
@ -546,7 +546,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 7,
track_title: String::from("Kulminacja"),
track_artist: vec![String::from("Frontside")],
@ -560,7 +560,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 8,
track_title: String::from("Judasz"),
track_artist: vec![String::from("Frontside")],
@ -574,7 +574,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 9,
track_title: String::from("Więzy"),
track_artist: vec![String::from("Frontside")],
@ -588,7 +588,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 10,
track_title: String::from("Zagubione dusze"),
track_artist: vec![String::from("Frontside")],
@ -602,7 +602,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
album_lib_id: AlbumLibId::Some(3),
album_lib_id: AlbumLibId::Value(3),
track_number: 11,
track_title: String::from("Linia życia"),
track_artist: vec![String::from("Frontside")],
@ -630,7 +630,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 1,
track_title: String::from("Unbreakable"),
track_artist: vec![String::from("Heavens Basement")],
@ -644,7 +644,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 2,
track_title: String::from("Guilt Trips and Sins"),
track_artist: vec![String::from("Heavens Basement")],
@ -658,7 +658,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 3,
track_title: String::from("The Long Goodbye"),
track_artist: vec![String::from("Heavens Basement")],
@ -672,7 +672,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 4,
track_title: String::from("Close Encounters"),
track_artist: vec![String::from("Heavens Basement")],
@ -686,7 +686,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 5,
track_title: String::from("Paranoia"),
track_artist: vec![String::from("Heavens Basement")],
@ -700,7 +700,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 6,
track_title: String::from("Let Me Out of Here"),
track_artist: vec![String::from("Heavens Basement")],
@ -714,7 +714,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Unbreakable"),
album_lib_id: AlbumLibId::Some(4),
album_lib_id: AlbumLibId::Value(4),
track_number: 7,
track_title: String::from("Leeches"),
track_artist: vec![String::from("Heavens Basement")],
@ -728,7 +728,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 1,
track_title: String::from("Fight Fire with Fire"),
track_artist: vec![String::from("Metallica")],
@ -742,7 +742,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 2,
track_title: String::from("Ride the Lightning"),
track_artist: vec![String::from("Metallica")],
@ -756,7 +756,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 3,
track_title: String::from("For Whom the Bell Tolls"),
track_artist: vec![String::from("Metallica")],
@ -770,7 +770,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 4,
track_title: String::from("Fade to Black"),
track_artist: vec![String::from("Metallica")],
@ -784,7 +784,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 5,
track_title: String::from("Trapped under Ice"),
track_artist: vec![String::from("Metallica")],
@ -798,7 +798,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 6,
track_title: String::from("Escape"),
track_artist: vec![String::from("Metallica")],
@ -812,7 +812,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 7,
track_title: String::from("Creeping Death"),
track_artist: vec![String::from("Metallica")],
@ -826,7 +826,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("Ride the Lightning"),
album_lib_id: AlbumLibId::Some(5),
album_lib_id: AlbumLibId::Value(5),
track_number: 8,
track_title: String::from("The Call of Ktulu"),
track_artist: vec![String::from("Metallica")],
@ -840,7 +840,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 1,
track_title: String::from("The Ecstasy of Gold"),
track_artist: vec![String::from("Metallica")],
@ -854,7 +854,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 2,
track_title: String::from("The Call of Ktulu"),
track_artist: vec![String::from("Metallica")],
@ -868,7 +868,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 3,
track_title: String::from("Master of Puppets"),
track_artist: vec![String::from("Metallica")],
@ -882,7 +882,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 4,
track_title: String::from("Of Wolf and Man"),
track_artist: vec![String::from("Metallica")],
@ -896,7 +896,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 5,
track_title: String::from("The Thing That Should Not Be"),
track_artist: vec![String::from("Metallica")],
@ -910,7 +910,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 6,
track_title: String::from("Fuel"),
track_artist: vec![String::from("Metallica")],
@ -924,7 +924,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 7,
track_title: String::from("The Memory Remains"),
track_artist: vec![String::from("Metallica")],
@ -938,7 +938,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 8,
track_title: String::from("No Leaf Clover"),
track_artist: vec![String::from("Metallica")],
@ -952,7 +952,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 9,
track_title: String::from("Hero of the Day"),
track_artist: vec![String::from("Metallica")],
@ -966,7 +966,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 10,
track_title: String::from("Devils Dance"),
track_artist: vec![String::from("Metallica")],
@ -980,7 +980,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 11,
track_title: String::from("Bleeding Me"),
track_artist: vec![String::from("Metallica")],
@ -994,7 +994,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 12,
track_title: String::from("Nothing Else Matters"),
track_artist: vec![String::from("Metallica")],
@ -1008,7 +1008,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 13,
track_title: String::from("Until It Sleeps"),
track_artist: vec![String::from("Metallica")],
@ -1022,7 +1022,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 14,
track_title: String::from("For Whom the Bell Tolls"),
track_artist: vec![String::from("Metallica")],
@ -1036,7 +1036,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 15,
track_title: String::from("Human"),
track_artist: vec![String::from("Metallica")],
@ -1050,7 +1050,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 16,
track_title: String::from("Wherever I May Roam"),
track_artist: vec![String::from("Metallica")],
@ -1064,7 +1064,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 17,
track_title: String::from("Outlaw Torn"),
track_artist: vec![String::from("Metallica")],
@ -1078,7 +1078,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 18,
track_title: String::from("Sad but True"),
track_artist: vec![String::from("Metallica")],
@ -1092,7 +1092,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 19,
track_title: String::from("One"),
track_artist: vec![String::from("Metallica")],
@ -1106,7 +1106,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 20,
track_title: String::from("Enter Sandman"),
track_artist: vec![String::from("Metallica")],
@ -1120,7 +1120,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_month: 0,
album_day: 0,
album_title: String::from("S&M"),
album_lib_id: AlbumLibId::Some(6),
album_lib_id: AlbumLibId::Value(6),
track_number: 21,
track_title: String::from("Battery"),
track_artist: vec![String::from("Metallica")],

View File

@ -41,7 +41,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("Slovo"),
lib_id: AlbumLibId::Some(7),
lib_id: AlbumLibId::Value(7),
},
date: 2011.into(),
seq: AlbumSeq(0),
@ -234,7 +234,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("Vên [rerecorded]"),
lib_id: AlbumLibId::Some(1),
lib_id: AlbumLibId::Value(1),
},
date: 2004.into(),
seq: AlbumSeq(0),
@ -317,7 +317,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("Slania"),
lib_id: AlbumLibId::Some(2),
lib_id: AlbumLibId::Value(2),
},
date: 2008.into(),
seq: AlbumSeq(0),
@ -488,7 +488,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
lib_id: AlbumLibId::Some(3),
lib_id: AlbumLibId::Value(3),
},
date: 2001.into(),
seq: AlbumSeq(0),
@ -670,7 +670,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("Unbreakable"),
lib_id: AlbumLibId::Some(4),
lib_id: AlbumLibId::Value(4),
},
date: 2011.into(),
seq: AlbumSeq(0),
@ -786,7 +786,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("Ride the Lightning"),
lib_id: AlbumLibId::Some(5),
lib_id: AlbumLibId::Value(5),
},
date: 1984.into(),
seq: AlbumSeq(0),
@ -891,7 +891,7 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
meta: AlbumMeta {
id: AlbumId {
title: String::from("S&M"),
lib_id: AlbumLibId::Some(6),
lib_id: AlbumLibId::Value(6),
},
date: 1999.into(),
seq: AlbumSeq(0),