musichoard/tests/lib.rs

807 lines
33 KiB
Rust
Raw Normal View History

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