Explicit test data for integration tests as well
Some checks failed
Cargo CI / Build and Test (pull_request) Successful in 1m5s
Cargo CI / Lint (pull_request) Failing after 43s

This commit is contained in:
Wojciech Kozlowski 2024-01-21 15:08:33 +01:00
parent ddc212343f
commit 7348e0d04e
3 changed files with 910 additions and 41 deletions

View File

@ -7,15 +7,12 @@ use std::{
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use musichoard::{ use musichoard::library::{
library::{ beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary},
beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary}, Field, ILibrary, Item, Query,
Field, ILibrary, Item, Query,
},
Artist,
}; };
use crate::testlib::COLLECTION; use super::testmod::LIBRARY_ITEMS;
pub static BEETS_TEST_CONFIG_PATH: Lazy<PathBuf> = pub static BEETS_TEST_CONFIG_PATH: Lazy<PathBuf> =
Lazy::new(|| fs::canonicalize("./tests/files/library/config.yml").unwrap()); Lazy::new(|| fs::canonicalize("./tests/files/library/config.yml").unwrap());
@ -34,36 +31,6 @@ pub static BEETS_TEST_CONFIG: Lazy<Arc<Mutex<BeetsLibrary<BeetsLibraryProcessExe
))) )))
}); });
fn artist_to_items(artist: &Artist) -> Vec<Item> {
let mut items = vec![];
for album in artist.albums.iter() {
for track in album.tracks.iter() {
items.push(Item {
album_artist: artist.id.name.clone(),
album_artist_sort: artist.sort.as_ref().map(|s| s.name.clone()),
album_year: album.id.year,
album_title: album.id.title.clone(),
track_number: track.id.number,
track_title: track.id.title.clone(),
track_artist: track.artist.clone(),
track_format: track.quality.format,
track_bitrate: track.quality.bitrate,
});
}
}
items
}
fn artists_to_items(artists: &[Artist]) -> Vec<Item> {
let mut items = vec![];
for artist in artists.iter() {
items.append(&mut artist_to_items(artist));
}
items
}
#[test] #[test]
fn test_no_config_list() { fn test_no_config_list() {
let beets_arc = BEETS_EMPTY_CONFIG.clone(); let beets_arc = BEETS_EMPTY_CONFIG.clone();
@ -92,7 +59,7 @@ fn test_full_list() {
let beets = &mut beets_arc.lock().unwrap(); let beets = &mut beets_arc.lock().unwrap();
let output = beets.list(&Query::new()).unwrap(); let output = beets.list(&Query::new()).unwrap();
let expected: Vec<Item> = artists_to_items(&COLLECTION); let expected: Vec<Item> = LIBRARY_ITEMS.to_owned();
let output: HashSet<_> = output.iter().collect(); let output: HashSet<_> = output.iter().collect();
let expected: HashSet<_> = expected.iter().collect(); let expected: HashSet<_> = expected.iter().collect();
@ -108,7 +75,11 @@ fn test_album_artist_query() {
.list(Query::new().include(Field::AlbumArtist(String::from("Аркона")))) .list(Query::new().include(Field::AlbumArtist(String::from("Аркона"))))
.unwrap(); .unwrap();
let expected: Vec<Item> = artists_to_items(&COLLECTION[0..1]); let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.filter(|it| it.album_artist == "Аркона")
.collect();
assert_eq!(output, expected); assert_eq!(output, expected);
} }
@ -121,7 +92,11 @@ fn test_album_title_query() {
.list(Query::new().include(Field::AlbumTitle(String::from("Slovo")))) .list(Query::new().include(Field::AlbumTitle(String::from("Slovo"))))
.unwrap(); .unwrap();
let expected: Vec<Item> = artists_to_items(&COLLECTION[0..1]); let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.filter(|it| it.album_title == "Slovo")
.collect();
assert_eq!(output, expected); assert_eq!(output, expected);
} }
@ -133,7 +108,11 @@ fn test_exclude_query() {
let output = beets let output = beets
.list(Query::new().exclude(Field::AlbumArtist(String::from("Аркона")))) .list(Query::new().exclude(Field::AlbumArtist(String::from("Аркона"))))
.unwrap(); .unwrap();
let expected: Vec<Item> = artists_to_items(&COLLECTION[1..]); let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.filter(|it| it.album_artist != "Аркона")
.collect();
let output: HashSet<_> = output.iter().collect(); let output: HashSet<_> = output.iter().collect();
let expected: HashSet<_> = expected.iter().collect(); let expected: HashSet<_> = expected.iter().collect();

View File

@ -1,2 +1,4 @@
mod testmod;
#[cfg(feature = "library-beets")] #[cfg(feature = "library-beets")]
pub mod beets; pub mod beets;

888
tests/library/testmod.rs Normal file
View File

@ -0,0 +1,888 @@
use once_cell::sync::Lazy;
use musichoard::{library::Item, Format};
pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
vec![
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 1,
track_title: String::from("Az"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 992,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 2,
track_title: String::from("Arkaim"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1061,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 3,
track_title: String::from("Bolno mne"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1004,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 4,
track_title: String::from("Leshiy"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1077,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 5,
track_title: String::from("Zakliatie"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1041,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 6,
track_title: String::from("Predok"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 756,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 7,
track_title: String::from("Nikogda"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1059,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 8,
track_title: String::from("Tam za tumanami"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1023,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 9,
track_title: String::from("Potomok"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 838,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 10,
track_title: String::from("Slovo"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1028,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 11,
track_title: String::from("Odna"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 991,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 12,
track_title: String::from("Vo moiom sadochke…"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 919,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 13,
track_title: String::from("Stenka na stenku"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 1039,
},
Item {
album_artist: String::from("Аркона"),
album_artist_sort: Some(String::from("Arkona")),
album_year: 2011,
album_title: String::from("Slovo"),
track_number: 14,
track_title: String::from("Zimushka"),
track_artist: vec![String::from("Аркона")],
track_format: Format::Flac,
track_bitrate: 974,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 1,
track_title: String::from("Verja Urit an Bitus"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 961,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 2,
track_title: String::from("Uis Elveti"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1067,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 3,
track_title: String::from("Ôrô"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 933,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 4,
track_title: String::from("Lament"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1083,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 5,
track_title: String::from("Druid"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1073,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2004,
album_title: String::from("Vên [rerecorded]"),
track_number: 6,
track_title: String::from("Jêzaïg"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1002,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 1,
track_title: String::from("Samon"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 953,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 2,
track_title: String::from("Primordial Breath"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1103,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 3,
track_title: String::from("Inis Mona"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1117,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 4,
track_title: String::from("Gray Sublime Archon"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1092,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 5,
track_title: String::from("Anagantios"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 923,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 6,
track_title: String::from("Bloodstained Ground"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1098,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 7,
track_title: String::from("The Somber Lay"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1068,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 8,
track_title: String::from("Slanias Song"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1098,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 9,
track_title: String::from("Giamonios"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 825,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 10,
track_title: String::from("Tarvos"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1115,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 11,
track_title: String::from("Calling the Rain"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1096,
},
Item {
album_artist: String::from("Eluveitie"),
album_artist_sort: None,
album_year: 2008,
album_title: String::from("Slania"),
track_number: 12,
track_title: String::from("Elembivos"),
track_artist: vec![String::from("Eluveitie")],
track_format: Format::Flac,
track_bitrate: 1059,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 1,
track_title: String::from("Intro = Chaos"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1024,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 2,
track_title: String::from("Modlitwa"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1073,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 3,
track_title: String::from("Długa droga z piekła"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1058,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 4,
track_title: String::from("Synowie ognia"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1066,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 5,
track_title: String::from("1902"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1074,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 6,
track_title: String::from("Krew za krew"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1080,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 7,
track_title: String::from("Kulminacja"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 992,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 8,
track_title: String::from("Judasz"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1018,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 9,
track_title: String::from("Więzy"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1077,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 10,
track_title: String::from("Zagubione dusze"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 1033,
},
Item {
album_artist: String::from("Frontside"),
album_artist_sort: None,
album_year: 2001,
album_title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
track_number: 11,
track_title: String::from("Linia życia"),
track_artist: vec![String::from("Frontside")],
track_format: Format::Flac,
track_bitrate: 987,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Paper Plague"),
track_number: 0,
track_title: String::from("Paper Plague"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 320,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 1,
track_title: String::from("Unbreakable"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 208,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 2,
track_title: String::from("Guilt Trips and Sins"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 205,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 3,
track_title: String::from("The Long Goodbye"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 227,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 4,
track_title: String::from("Close Encounters"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 213,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 5,
track_title: String::from("Paranoia"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 218,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 6,
track_title: String::from("Let Me Out of Here"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 207,
},
Item {
album_artist: String::from("Heavens Basement"),
album_artist_sort: Some(String::from("Heavens Basement")),
album_year: 2011,
album_title: String::from("Unbreakable"),
track_number: 7,
track_title: String::from("Leeches"),
track_artist: vec![String::from("Heavens Basement")],
track_format: Format::Mp3,
track_bitrate: 225,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 1,
track_title: String::from("Fight Fire with Fire"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 954,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 2,
track_title: String::from("Ride the Lightning"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 951,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 3,
track_title: String::from("For Whom the Bell Tolls"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 889,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 4,
track_title: String::from("Fade to Black"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 939,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 5,
track_title: String::from("Trapped under Ice"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 955,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 6,
track_title: String::from("Escape"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 941,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 7,
track_title: String::from("Creeping Death"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 958,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1984,
album_title: String::from("Ride the Lightning"),
track_number: 8,
track_title: String::from("The Call of Ktulu"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 888,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 1,
track_title: String::from("The Ecstasy of Gold"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 875,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 2,
track_title: String::from("The Call of Ktulu"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1030,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 3,
track_title: String::from("Master of Puppets"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1082,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 4,
track_title: String::from("Of Wolf and Man"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1115,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 5,
track_title: String::from("The Thing That Should Not Be"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1029,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 6,
track_title: String::from("Fuel"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1057,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 7,
track_title: String::from("The Memory Remains"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1080,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 8,
track_title: String::from("No Leaf Clover"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1004,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 9,
track_title: String::from("Hero of the Day"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 962,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 10,
track_title: String::from("Devils Dance"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1076,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 11,
track_title: String::from("Bleeding Me"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 993,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 12,
track_title: String::from("Nothing Else Matters"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 875,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 13,
track_title: String::from("Until It Sleeps"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1038,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 14,
track_title: String::from("For Whom the Bell Tolls"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1072,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 15,
track_title: String::from("Human"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1029,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 16,
track_title: String::from("Wherever I May Roam"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1035,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 17,
track_title: String::from("Outlaw Torn"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1042,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 18,
track_title: String::from("Sad but True"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1082,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 19,
track_title: String::from("One"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 1017,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 20,
track_title: String::from("Enter Sandman"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 993,
},
Item {
album_artist: String::from("Metallica"),
album_artist_sort: None,
album_year: 1999,
album_title: String::from("S&M"),
track_number: 21,
track_title: String::from("Battery"),
track_artist: vec![String::from("Metallica")],
track_format: Format::Flac,
track_bitrate: 967,
},
]
});