Expand album date for sorting
Some checks failed
Cargo CI / Build and Test (pull_request) Successful in 3m6s
Cargo CI / Lint (pull_request) Failing after 1m16s

This commit is contained in:
Wojciech Kozlowski 2024-03-02 09:32:34 +01:00
parent 4dc56f66c6
commit 1098013703
13 changed files with 877 additions and 394 deletions

View File

@ -15,10 +15,56 @@ pub struct Album {
/// The album identifier.
#[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
pub struct AlbumId {
pub year: u32,
pub date: AlbumDate,
pub title: String,
}
// There are crates for handling dates, but we don't need much complexity beyond year-month-day.
#[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
pub struct AlbumDate {
pub year: u32,
pub month: AlbumMonth,
pub day: u8,
}
#[repr(u8)]
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
pub enum AlbumMonth {
None = 0,
January = 1,
February = 2,
March = 3,
April = 4,
May = 5,
June = 6,
July = 7,
August = 8,
September = 9,
October = 10,
November = 11,
December = 12,
}
impl From<u8> for AlbumMonth {
fn from(value: u8) -> Self {
match value {
1 => AlbumMonth::January,
2 => AlbumMonth::February,
3 => AlbumMonth::March,
4 => AlbumMonth::April,
5 => AlbumMonth::May,
6 => AlbumMonth::June,
7 => AlbumMonth::July,
8 => AlbumMonth::August,
9 => AlbumMonth::September,
10 => AlbumMonth::October,
11 => AlbumMonth::November,
12 => AlbumMonth::December,
_ => AlbumMonth::None,
}
}
}
impl Album {
pub fn get_sort_key(&self) -> &AlbumId {
&self.id
@ -51,6 +97,25 @@ mod tests {
use super::*;
#[test]
fn album_month() {
assert_eq!(<u8 as Into<AlbumMonth>>::into(0), AlbumMonth::None);
assert_eq!(<u8 as Into<AlbumMonth>>::into(1), AlbumMonth::January);
assert_eq!(<u8 as Into<AlbumMonth>>::into(2), AlbumMonth::February);
assert_eq!(<u8 as Into<AlbumMonth>>::into(3), AlbumMonth::March);
assert_eq!(<u8 as Into<AlbumMonth>>::into(4), AlbumMonth::April);
assert_eq!(<u8 as Into<AlbumMonth>>::into(5), AlbumMonth::May);
assert_eq!(<u8 as Into<AlbumMonth>>::into(6), AlbumMonth::June);
assert_eq!(<u8 as Into<AlbumMonth>>::into(7), AlbumMonth::July);
assert_eq!(<u8 as Into<AlbumMonth>>::into(8), AlbumMonth::August);
assert_eq!(<u8 as Into<AlbumMonth>>::into(9), AlbumMonth::September);
assert_eq!(<u8 as Into<AlbumMonth>>::into(10), AlbumMonth::October);
assert_eq!(<u8 as Into<AlbumMonth>>::into(11), AlbumMonth::November);
assert_eq!(<u8 as Into<AlbumMonth>>::into(12), AlbumMonth::December);
assert_eq!(<u8 as Into<AlbumMonth>>::into(13), AlbumMonth::None);
assert_eq!(<u8 as Into<AlbumMonth>>::into(255), AlbumMonth::None);
}
#[test]
fn merge_album_no_overlap() {
let left = FULL_COLLECTION[0].albums[0].to_owned();

View File

@ -5,7 +5,7 @@ use crate::core::collection::merge::Merge;
pub struct Track {
pub id: TrackId,
pub artist: Vec<String>,
pub quality: Quality,
pub quality: TrackQuality,
}
/// The track identifier.
@ -17,8 +17,8 @@ pub struct TrackId {
/// The track quality. Combines format and bitrate information.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Quality {
pub format: Format,
pub struct TrackQuality {
pub format: TrackFormat,
pub bitrate: u32,
}
@ -30,7 +30,7 @@ impl Track {
/// The track file format.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Format {
pub enum TrackFormat {
Flac,
Mp3,
}
@ -65,16 +65,16 @@ mod tests {
title: String::from("a title"),
},
artist: vec![String::from("left artist")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1411,
},
};
let right = Track {
id: left.id.clone(),
artist: vec![String::from("right artist")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 320,
},
};

View File

@ -7,7 +7,7 @@ pub mod executor;
use mockall::automock;
use crate::core::{
collection::track::Format,
collection::track::TrackFormat,
library::{Error, Field, ILibrary, Item, Query},
};
@ -27,6 +27,10 @@ const LIST_FORMAT_ARG: &str = concat!(
list_format_separator!(),
"$year",
list_format_separator!(),
"$month",
list_format_separator!(),
"$day",
list_format_separator!(),
"$album",
list_format_separator!(),
"$track",
@ -42,6 +46,21 @@ const LIST_FORMAT_ARG: &str = concat!(
const TRACK_FORMAT_FLAC: &str = "FLAC";
const TRACK_FORMAT_MP3: &str = "MP3";
fn format_to_str(format: &TrackFormat) -> &'static str {
match format {
TrackFormat::Flac => TRACK_FORMAT_FLAC,
TrackFormat::Mp3 => TRACK_FORMAT_MP3,
}
}
fn str_to_format(format: &str) -> Option<TrackFormat> {
match format {
TRACK_FORMAT_FLAC => Some(TrackFormat::Flac),
TRACK_FORMAT_MP3 => Some(TrackFormat::Mp3),
_ => None,
}
}
trait ToBeetsArg {
fn to_arg(&self, include: bool) -> String;
}
@ -57,10 +76,13 @@ impl ToBeetsArg for Field {
Field::AlbumArtist(ref s) => format!("{negate}albumartist:{s}"),
Field::AlbumArtistSort(ref s) => format!("{negate}albumartist_sort:{s}"),
Field::AlbumYear(ref u) => format!("{negate}year:{u}"),
Field::AlbumMonth(ref e) => format!("{negate}month:{}", *e as u8),
Field::AlbumDay(ref u) => format!("{negate}day:{u}"),
Field::AlbumTitle(ref s) => format!("{negate}album:{s}"),
Field::TrackNumber(ref u) => format!("{negate}track:{u}"),
Field::TrackTitle(ref s) => format!("{negate}title:{s}"),
Field::TrackArtist(ref v) => format!("{negate}artist:{}", v.join("; ")),
Field::TrackFormat(ref f) => format!("{negate}format:{}", format_to_str(f)),
Field::All(ref s) => format!("{negate}{s}"),
}
}
@ -127,36 +149,38 @@ impl<BLE: IBeetsLibraryExecutor> ILibraryPrivate for BeetsLibrary<BLE> {
}
let split: Vec<&str> = line.split(LIST_FORMAT_SEPARATOR).collect();
if split.len() != 9 {
if split.len() != 11 {
return Err(Error::Invalid(line.to_string()));
}
let album_artist = split[0].to_string();
let album_artist_sort = if !split[1].is_empty() {
Some(split[1].to_string())
} else {
None
let album_artist_sort = match !split[1].is_empty() {
true => Some(split[1].to_string()),
false => None,
};
let album_year = split[2].parse::<u32>()?;
let album_title = split[3].to_string();
let track_number = split[4].parse::<u32>()?;
let track_title = split[5].to_string();
let track_artist = split[6]
let album_month = split[3].parse::<u8>()?.into();
let album_day = split[4].parse::<u8>()?;
let album_title = split[5].to_string();
let track_number = split[6].parse::<u32>()?;
let track_title = split[7].to_string();
let track_artist = split[8]
.to_string()
.split("; ")
.map(|s| s.to_owned())
.collect();
let track_format = match split[7].to_string().as_str() {
TRACK_FORMAT_FLAC => Format::Flac,
TRACK_FORMAT_MP3 => Format::Mp3,
_ => return Err(Error::Invalid(line.to_string())),
let track_format = match str_to_format(split[9].to_string().as_str()) {
Some(format) => format,
None => return Err(Error::Invalid(line.to_string())),
};
let track_bitrate = split[8].trim_end_matches("kbps").parse::<u32>()?;
let track_bitrate = split[10].trim_end_matches("kbps").parse::<u32>()?;
items.push(Item {
album_artist,
album_artist_sort,
album_year,
album_month,
album_day,
album_title,
track_number,
track_title,
@ -177,7 +201,7 @@ mod testmod;
mod tests {
use mockall::predicate;
use crate::core::library::testmod::LIBRARY_ITEMS;
use crate::{core::library::testmod::LIBRARY_ITEMS, collection::album::AlbumMonth};
use super::*;
use testmod::LIBRARY_BEETS;
@ -191,6 +215,7 @@ mod tests {
String::from("some.artist.1"),
String::from("some.artist.2"),
]))
.exclude(Field::TrackFormat(TrackFormat::Mp3))
.exclude(Field::All(String::from("some.all")))
.to_args();
query.sort();
@ -199,6 +224,7 @@ mod tests {
query,
vec![
String::from("^album:some.album"),
String::from("^format:MP3"),
String::from("^some.all"),
String::from("artist:some.artist.1; some.artist.2"),
String::from("track:5"),
@ -209,7 +235,10 @@ mod tests {
.exclude(Field::AlbumArtist(String::from("some.albumartist")))
.exclude(Field::AlbumArtistSort(String::from("some.albumartist")))
.include(Field::AlbumYear(3030))
.include(Field::AlbumMonth(AlbumMonth::April))
.include(Field::AlbumDay(6))
.include(Field::TrackTitle(String::from("some.track")))
.include(Field::TrackFormat(TrackFormat::Flac))
.exclude(Field::TrackArtist(vec![
String::from("some.artist.1"),
String::from("some.artist.2"),
@ -223,6 +252,9 @@ mod tests {
String::from("^albumartist:some.albumartist"),
String::from("^albumartist_sort:some.albumartist"),
String::from("^artist:some.artist.1; some.artist.2"),
String::from("day:6"),
String::from("format:FLAC"),
String::from("month:4"),
String::from("title:some.track"),
String::from("year:3030"),
]
@ -335,8 +367,8 @@ mod tests {
.split(LIST_FORMAT_SEPARATOR)
.map(|s| s.to_owned())
.collect::<Vec<String>>();
invalid_string[7].clear();
invalid_string[7].push_str("invalid format");
invalid_string[9].clear();
invalid_string[9].push_str("invalid format");
let invalid_string = invalid_string.join(LIST_FORMAT_SEPARATOR);
output[2] = invalid_string.clone();
let result = Ok(output);

View File

@ -2,27 +2,115 @@ use once_cell::sync::Lazy;
pub static LIBRARY_BEETS: Lazy<Vec<String>> = Lazy::new(|| -> Vec<String> {
vec![
String::from("Album_Artist A -*^- -*^- 1998 -*^- album_title a.a -*^- 1 -*^- track a.a.1 -*^- artist a.a.1 -*^- FLAC -*^- 992"),
String::from("Album_Artist A -*^- -*^- 1998 -*^- album_title a.a -*^- 2 -*^- track a.a.2 -*^- artist a.a.2.1; artist a.a.2.2 -*^- MP3 -*^- 320"),
String::from("Album_Artist A -*^- -*^- 1998 -*^- album_title a.a -*^- 3 -*^- track a.a.3 -*^- artist a.a.3 -*^- FLAC -*^- 1061"),
String::from("Album_Artist A -*^- -*^- 1998 -*^- album_title a.a -*^- 4 -*^- track a.a.4 -*^- artist a.a.4 -*^- FLAC -*^- 1042"),
String::from("Album_Artist A -*^- -*^- 2015 -*^- album_title a.b -*^- 1 -*^- track a.b.1 -*^- artist a.b.1 -*^- FLAC -*^- 1004"),
String::from("Album_Artist A -*^- -*^- 2015 -*^- album_title a.b -*^- 2 -*^- track a.b.2 -*^- artist a.b.2 -*^- FLAC -*^- 1077"),
String::from("Album_Artist B -*^- -*^- 2003 -*^- album_title b.a -*^- 1 -*^- track b.a.1 -*^- artist b.a.1 -*^- MP3 -*^- 190"),
String::from("Album_Artist B -*^- -*^- 2003 -*^- album_title b.a -*^- 2 -*^- track b.a.2 -*^- artist b.a.2.1; artist b.a.2.2 -*^- MP3 -*^- 120"),
String::from("Album_Artist B -*^- -*^- 2008 -*^- album_title b.b -*^- 1 -*^- track b.b.1 -*^- artist b.b.1 -*^- FLAC -*^- 1077"),
String::from("Album_Artist B -*^- -*^- 2008 -*^- album_title b.b -*^- 2 -*^- track b.b.2 -*^- artist b.b.2.1; artist b.b.2.2 -*^- MP3 -*^- 320"),
String::from("Album_Artist B -*^- -*^- 2009 -*^- album_title b.c -*^- 1 -*^- track b.c.1 -*^- artist b.c.1 -*^- MP3 -*^- 190"),
String::from("Album_Artist B -*^- -*^- 2009 -*^- album_title b.c -*^- 2 -*^- track b.c.2 -*^- artist b.c.2.1; artist b.c.2.2 -*^- MP3 -*^- 120"),
String::from("Album_Artist B -*^- -*^- 2015 -*^- album_title b.d -*^- 1 -*^- track b.d.1 -*^- artist b.d.1 -*^- MP3 -*^- 190"),
String::from("Album_Artist B -*^- -*^- 2015 -*^- album_title b.d -*^- 2 -*^- track b.d.2 -*^- artist b.d.2.1; artist b.d.2.2 -*^- MP3 -*^- 120"),
String::from("The Album_Artist C -*^- Album_Artist C, The -*^- 1985 -*^- album_title c.a -*^- 1 -*^- track c.a.1 -*^- artist c.a.1 -*^- MP3 -*^- 320"),
String::from("The Album_Artist C -*^- Album_Artist C, The -*^- 1985 -*^- album_title c.a -*^- 2 -*^- track c.a.2 -*^- artist c.a.2.1; artist c.a.2.2 -*^- MP3 -*^- 120"),
String::from("The Album_Artist C -*^- Album_Artist C, The -*^- 2018 -*^- album_title c.b -*^- 1 -*^- track c.b.1 -*^- artist c.b.1 -*^- FLAC -*^- 1041"),
String::from("The Album_Artist C -*^- Album_Artist C, The -*^- 2018 -*^- album_title c.b -*^- 2 -*^- track c.b.2 -*^- artist c.b.2.1; artist c.b.2.2 -*^- FLAC -*^- 756"),
String::from("Album_Artist D -*^- -*^- 1995 -*^- album_title d.a -*^- 1 -*^- track d.a.1 -*^- artist d.a.1 -*^- MP3 -*^- 120"),
String::from("Album_Artist D -*^- -*^- 1995 -*^- album_title d.a -*^- 2 -*^- track d.a.2 -*^- artist d.a.2.1; artist d.a.2.2 -*^- MP3 -*^- 120"),
String::from("Album_Artist D -*^- -*^- 2028 -*^- album_title d.b -*^- 1 -*^- track d.b.1 -*^- artist d.b.1 -*^- FLAC -*^- 841"),
String::from("Album_Artist D -*^- -*^- 2028 -*^- album_title d.b -*^- 2 -*^- track d.b.2 -*^- artist d.b.2.1; artist d.b.2.2 -*^- FLAC -*^- 756")
String::from(
"Album_Artist A -*^- -*^- \
1998 -*^- 00 -*^- 00 -*^- album_title a.a -*^- \
1 -*^- track a.a.1 -*^- artist a.a.1 -*^- FLAC -*^- 992",
),
String::from(
"Album_Artist A -*^- -*^- \
1998 -*^- 00 -*^- 00 -*^- album_title a.a -*^- \
2 -*^- track a.a.2 -*^- artist a.a.2.1; artist a.a.2.2 -*^- MP3 -*^- 320",
),
String::from(
"Album_Artist A -*^- -*^- \
1998 -*^- 00 -*^- 00 -*^- album_title a.a -*^- \
3 -*^- track a.a.3 -*^- artist a.a.3 -*^- FLAC -*^- 1061",
),
String::from(
"Album_Artist A -*^- -*^- \
1998 -*^- 00 -*^- 00 -*^- album_title a.a -*^- \
4 -*^- track a.a.4 -*^- artist a.a.4 -*^- FLAC -*^- 1042",
),
String::from(
"Album_Artist A -*^- -*^- \
2015 -*^- 04 -*^- 00 -*^- album_title a.b -*^- \
1 -*^- track a.b.1 -*^- artist a.b.1 -*^- FLAC -*^- 1004",
),
String::from(
"Album_Artist A -*^- -*^- \
2015 -*^- 04 -*^- 00 -*^- album_title a.b -*^- \
2 -*^- track a.b.2 -*^- artist a.b.2 -*^- FLAC -*^- 1077",
),
String::from(
"Album_Artist B -*^- -*^- \
2003 -*^- 06 -*^- 06 -*^- album_title b.a -*^- \
1 -*^- track b.a.1 -*^- artist b.a.1 -*^- MP3 -*^- 190",
),
String::from(
"Album_Artist B -*^- -*^- \
2003 -*^- 06 -*^- 06 -*^- album_title b.a -*^- \
2 -*^- track b.a.2 -*^- artist b.a.2.1; artist b.a.2.2 -*^- MP3 -*^- 120",
),
String::from(
"Album_Artist B -*^- -*^- \
2008 -*^- 00 -*^- 00 -*^- album_title b.b -*^- \
1 -*^- track b.b.1 -*^- artist b.b.1 -*^- FLAC -*^- 1077",
),
String::from(
"Album_Artist B -*^- -*^- \
2008 -*^- 00 -*^- 00 -*^- album_title b.b -*^- \
2 -*^- track b.b.2 -*^- artist b.b.2.1; artist b.b.2.2 -*^- MP3 -*^- 320",
),
String::from(
"Album_Artist B -*^- -*^- \
2009 -*^- 00 -*^- 00 -*^- album_title b.c -*^- \
1 -*^- track b.c.1 -*^- artist b.c.1 -*^- MP3 -*^- 190",
),
String::from(
"Album_Artist B -*^- -*^- \
2009 -*^- 00 -*^- 00 -*^- album_title b.c -*^- \
2 -*^- track b.c.2 -*^- artist b.c.2.1; artist b.c.2.2 -*^- MP3 -*^- 120",
),
String::from(
"Album_Artist B -*^- -*^- \
2015 -*^- 00 -*^- 00 -*^- album_title b.d -*^- \
1 -*^- track b.d.1 -*^- artist b.d.1 -*^- MP3 -*^- 190",
),
String::from(
"Album_Artist B -*^- -*^- \
2015 -*^- 00 -*^- 00 -*^- album_title b.d -*^- \
2 -*^- track b.d.2 -*^- artist b.d.2.1; artist b.d.2.2 -*^- MP3 -*^- 120",
),
String::from(
"The Album_Artist C -*^- Album_Artist C, The -*^- \
1985 -*^- 00 -*^- 00 -*^- album_title c.a -*^- \
1 -*^- track c.a.1 -*^- artist c.a.1 -*^- MP3 -*^- 320",
),
String::from(
"The Album_Artist C -*^- Album_Artist C, The -*^- \
1985 -*^- 00 -*^- 00 -*^- album_title c.a -*^- \
2 -*^- track c.a.2 -*^- artist c.a.2.1; artist c.a.2.2 -*^- MP3 -*^- 120",
),
String::from(
"The Album_Artist C -*^- Album_Artist C, The -*^- \
2018 -*^- 00 -*^- 00 -*^- album_title c.b -*^- \
1 -*^- track c.b.1 -*^- artist c.b.1 -*^- FLAC -*^- 1041",
),
String::from(
"The Album_Artist C -*^- Album_Artist C, The -*^- \
2018 -*^- 00 -*^- 00 -*^- album_title c.b -*^- \
2 -*^- track c.b.2 -*^- artist c.b.2.1; artist c.b.2.2 -*^- FLAC -*^- 756",
),
String::from(
"Album_Artist D -*^- -*^- \
1995 -*^- 00 -*^- 00 -*^- album_title d.a -*^- \
1 -*^- track d.a.1 -*^- artist d.a.1 -*^- MP3 -*^- 120",
),
String::from(
"Album_Artist D -*^- -*^- \
1995 -*^- 00 -*^- 00 -*^- album_title d.a -*^- \
2 -*^- track d.a.2 -*^- artist d.a.2.1; artist d.a.2.2 -*^- MP3 -*^- 120",
),
String::from(
"Album_Artist D -*^- -*^- \
2028 -*^- 00 -*^- 00 -*^- album_title d.b -*^- \
1 -*^- track d.b.1 -*^- artist d.b.1 -*^- FLAC -*^- 841",
),
String::from(
"Album_Artist D -*^- -*^- \
2028 -*^- 00 -*^- 00 -*^- album_title d.b -*^- \
2 -*^- track d.b.2 -*^- artist d.b.2.1; artist d.b.2.2 -*^- FLAC -*^- 756",
),
]
});

View File

@ -8,7 +8,7 @@ use std::{collections::HashSet, fmt, num::ParseIntError, str::Utf8Error};
#[cfg(test)]
use mockall::automock;
use crate::core::collection::track::Format;
use crate::core::collection::{album::AlbumMonth, track::TrackFormat};
/// Trait for interacting with the music library.
#[cfg_attr(test, automock)]
@ -32,11 +32,13 @@ pub struct Item {
pub album_artist: String,
pub album_artist_sort: Option<String>,
pub album_year: u32,
pub album_month: AlbumMonth,
pub album_day: u8,
pub album_title: String,
pub track_number: u32,
pub track_title: String,
pub track_artist: Vec<String>,
pub track_format: Format,
pub track_format: TrackFormat,
pub track_bitrate: u32,
}
@ -46,10 +48,13 @@ pub enum Field {
AlbumArtist(String),
AlbumArtistSort(String),
AlbumYear(u32),
AlbumMonth(AlbumMonth),
AlbumDay(u8),
AlbumTitle(String),
TrackNumber(u32),
TrackTitle(String),
TrackArtist(Vec<String>),
TrackFormat(TrackFormat),
All(String),
}

View File

@ -1,6 +1,9 @@
use once_cell::sync::Lazy;
use crate::core::{collection::track::Format, library::Item};
use crate::core::{
collection::{album::AlbumMonth, track::TrackFormat},
library::Item,
};
pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
vec![
@ -8,17 +11,21 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 1998,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title a.a"),
track_number: 1,
track_title: String::from("track a.a.1"),
track_artist: vec![String::from("artist a.a.1")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 992,
},
Item {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 1998,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title a.a"),
track_number: 2,
track_title: String::from("track a.a.2"),
@ -26,68 +33,80 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist a.a.2.1"),
String::from("artist a.a.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 320,
},
Item {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 1998,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title a.a"),
track_number: 3,
track_title: String::from("track a.a.3"),
track_artist: vec![String::from("artist a.a.3")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1061,
},
Item {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 1998,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title a.a"),
track_number: 4,
track_title: String::from("track a.a.4"),
track_artist: vec![String::from("artist a.a.4")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1042,
},
Item {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 2015,
album_month: AlbumMonth::April,
album_day: 0,
album_title: String::from("album_title a.b"),
track_number: 1,
track_title: String::from("track a.b.1"),
track_artist: vec![String::from("artist a.b.1")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1004,
},
Item {
album_artist: String::from("Album_Artist A"),
album_artist_sort: None,
album_year: 2015,
album_month: AlbumMonth::April,
album_day: 0,
album_title: String::from("album_title a.b"),
track_number: 2,
track_title: String::from("track a.b.2"),
track_artist: vec![String::from("artist a.b.2")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1077,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2003,
album_month: AlbumMonth::June,
album_day: 6,
album_title: String::from("album_title b.a"),
track_number: 1,
track_title: String::from("track b.a.1"),
track_artist: vec![String::from("artist b.a.1")],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 190,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2003,
album_month: AlbumMonth::June,
album_day: 6,
album_title: String::from("album_title b.a"),
track_number: 2,
track_title: String::from("track b.a.2"),
@ -95,24 +114,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist b.a.2.1"),
String::from("artist b.a.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2008,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.b"),
track_number: 1,
track_title: String::from("track b.b.1"),
track_artist: vec![String::from("artist b.b.1")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1077,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2008,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.b"),
track_number: 2,
track_title: String::from("track b.b.2"),
@ -120,24 +143,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist b.b.2.1"),
String::from("artist b.b.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 320,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2009,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.c"),
track_number: 1,
track_title: String::from("track b.c.1"),
track_artist: vec![String::from("artist b.c.1")],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 190,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2009,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.c"),
track_number: 2,
track_title: String::from("track b.c.2"),
@ -145,24 +172,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist b.c.2.1"),
String::from("artist b.c.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2015,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.d"),
track_number: 1,
track_title: String::from("track b.d.1"),
track_artist: vec![String::from("artist b.d.1")],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 190,
},
Item {
album_artist: String::from("Album_Artist B"),
album_artist_sort: None,
album_year: 2015,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title b.d"),
track_number: 2,
track_title: String::from("track b.d.2"),
@ -170,24 +201,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist b.d.2.1"),
String::from("artist b.d.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("The Album_Artist C"),
album_artist_sort: Some(String::from("Album_Artist C, The")),
album_year: 1985,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title c.a"),
track_number: 1,
track_title: String::from("track c.a.1"),
track_artist: vec![String::from("artist c.a.1")],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 320,
},
Item {
album_artist: String::from("The Album_Artist C"),
album_artist_sort: Some(String::from("Album_Artist C, The")),
album_year: 1985,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title c.a"),
track_number: 2,
track_title: String::from("track c.a.2"),
@ -195,24 +230,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist c.a.2.1"),
String::from("artist c.a.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("The Album_Artist C"),
album_artist_sort: Some(String::from("Album_Artist C, The")),
album_year: 2018,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title c.b"),
track_number: 1,
track_title: String::from("track c.b.1"),
track_artist: vec![String::from("artist c.b.1")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 1041,
},
Item {
album_artist: String::from("The Album_Artist C"),
album_artist_sort: Some(String::from("Album_Artist C, The")),
album_year: 2018,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title c.b"),
track_number: 2,
track_title: String::from("track c.b.2"),
@ -220,24 +259,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist c.b.2.1"),
String::from("artist c.b.2.2"),
],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 756,
},
Item {
album_artist: String::from("Album_Artist D"),
album_artist_sort: None,
album_year: 1995,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title d.a"),
track_number: 1,
track_title: String::from("track d.a.1"),
track_artist: vec![String::from("artist d.a.1")],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("Album_Artist D"),
album_artist_sort: None,
album_year: 1995,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title d.a"),
track_number: 2,
track_title: String::from("track d.a.2"),
@ -245,24 +288,28 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist d.a.2.1"),
String::from("artist d.a.2.2"),
],
track_format: Format::Mp3,
track_format: TrackFormat::Mp3,
track_bitrate: 120,
},
Item {
album_artist: String::from("Album_Artist D"),
album_artist_sort: None,
album_year: 2028,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title d.b"),
track_number: 1,
track_title: String::from("track d.b.1"),
track_artist: vec![String::from("artist d.b.1")],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 841,
},
Item {
album_artist: String::from("Album_Artist D"),
album_artist_sort: None,
album_year: 2028,
album_month: AlbumMonth::None,
album_day: 0,
album_title: String::from("album_title d.b"),
track_number: 2,
track_title: String::from("track d.b.2"),
@ -270,7 +317,7 @@ pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
String::from("artist d.b.2.1"),
String::from("artist d.b.2.2"),
],
track_format: Format::Flac,
track_format: TrackFormat::Flac,
track_bitrate: 756,
},
]

View File

@ -2,9 +2,9 @@ use std::collections::HashMap;
use crate::core::{
collection::{
album::{Album, AlbumId},
album::{Album, AlbumDate, AlbumId},
artist::{Artist, ArtistId},
track::{Quality, Track, TrackId},
track::{Track, TrackId, TrackQuality},
Collection, Merge,
},
database::IDatabase,
@ -99,7 +99,11 @@ impl<LIB, DB> MusicHoard<LIB, DB> {
let artist_sort = item.album_artist_sort.map(|s| ArtistId { name: s });
let album_id = AlbumId {
year: item.album_year,
date: AlbumDate {
year: item.album_year,
month: item.album_month,
day: item.album_day,
},
title: item.album_title,
};
@ -109,7 +113,7 @@ impl<LIB, DB> MusicHoard<LIB, DB> {
title: item.track_title,
},
artist: item.track_artist,
quality: Quality {
quality: TrackQuality {
format: item.track_format,
bitrate: item.track_bitrate,
},
@ -887,7 +891,7 @@ mod tests {
}
#[test]
fn rescan_library_album_title_year_clash() {
fn rescan_library_album_title_date_clash() {
let mut library = MockILibrary::new();
let mut expected = LIBRARY_COLLECTION.to_owned();
@ -896,9 +900,14 @@ mod tests {
let mut items = LIBRARY_ITEMS.to_owned();
for item in items.iter_mut().filter(|it| {
(it.album_year == removed_album_id.year) && (it.album_title == removed_album_id.title)
(it.album_year == removed_album_id.date.year)
&& (it.album_month == removed_album_id.date.month)
&& (it.album_day == removed_album_id.date.day)
&& (it.album_title == removed_album_id.title)
}) {
item.album_year = clashed_album_id.year;
item.album_year = clashed_album_id.date.year;
item.album_month = clashed_album_id.date.month;
item.album_day = clashed_album_id.date.day;
item.album_title = clashed_album_id.title.clone();
}

View File

@ -2,9 +2,9 @@ use once_cell::sync::Lazy;
use std::collections::HashMap;
use crate::core::collection::{
album::{Album, AlbumId},
album::{Album, AlbumDate, AlbumId, AlbumMonth},
artist::{Artist, ArtistId, MusicBrainz},
track::{Format, Quality, Track, TrackId},
track::{Track, TrackFormat, TrackId, TrackQuality},
};
use crate::tests::*;

View File

@ -11,7 +11,11 @@ macro_rules! library_collection {
albums: vec![
Album {
id: AlbumId {
year: 1998,
date: AlbumDate {
year: 1998,
month: AlbumMonth::None,
day: 0,
},
title: "album_title a.a".to_string(),
},
tracks: vec![
@ -21,8 +25,8 @@ macro_rules! library_collection {
title: "track a.a.1".to_string(),
},
artist: vec!["artist a.a.1".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 992,
},
},
@ -35,8 +39,8 @@ macro_rules! library_collection {
"artist a.a.2.1".to_string(),
"artist a.a.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 320,
},
},
@ -46,8 +50,8 @@ macro_rules! library_collection {
title: "track a.a.3".to_string(),
},
artist: vec!["artist a.a.3".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1061,
},
},
@ -57,8 +61,8 @@ macro_rules! library_collection {
title: "track a.a.4".to_string(),
},
artist: vec!["artist a.a.4".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1042,
},
},
@ -66,7 +70,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2015,
date: AlbumDate {
year: 2015,
month: AlbumMonth::April,
day: 0,
},
title: "album_title a.b".to_string(),
},
tracks: vec![
@ -76,8 +84,8 @@ macro_rules! library_collection {
title: "track a.b.1".to_string(),
},
artist: vec!["artist a.b.1".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1004,
},
},
@ -87,8 +95,8 @@ macro_rules! library_collection {
title: "track a.b.2".to_string(),
},
artist: vec!["artist a.b.2".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1077,
},
},
@ -106,7 +114,11 @@ macro_rules! library_collection {
albums: vec![
Album {
id: AlbumId {
year: 2003,
date: AlbumDate {
year: 2003,
month: AlbumMonth::June,
day: 6,
},
title: "album_title b.a".to_string(),
},
tracks: vec![
@ -116,8 +128,8 @@ macro_rules! library_collection {
title: "track b.a.1".to_string(),
},
artist: vec!["artist b.a.1".to_string()],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 190,
},
},
@ -130,8 +142,8 @@ macro_rules! library_collection {
"artist b.a.2.1".to_string(),
"artist b.a.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -139,7 +151,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2008,
date: AlbumDate {
year: 2008,
month: AlbumMonth::None,
day: 0,
},
title: "album_title b.b".to_string(),
},
tracks: vec![
@ -149,8 +165,8 @@ macro_rules! library_collection {
title: "track b.b.1".to_string(),
},
artist: vec!["artist b.b.1".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1077,
},
},
@ -163,8 +179,8 @@ macro_rules! library_collection {
"artist b.b.2.1".to_string(),
"artist b.b.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 320,
},
},
@ -172,7 +188,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2009,
date: AlbumDate {
year: 2009,
month: AlbumMonth::None,
day: 0,
},
title: "album_title b.c".to_string(),
},
tracks: vec![
@ -182,8 +202,8 @@ macro_rules! library_collection {
title: "track b.c.1".to_string(),
},
artist: vec!["artist b.c.1".to_string()],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 190,
},
},
@ -196,8 +216,8 @@ macro_rules! library_collection {
"artist b.c.2.1".to_string(),
"artist b.c.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -205,7 +225,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2015,
date: AlbumDate {
year: 2015,
month: AlbumMonth::None,
day: 0,
},
title: "album_title b.d".to_string(),
},
tracks: vec![
@ -215,8 +239,8 @@ macro_rules! library_collection {
title: "track b.d.1".to_string(),
},
artist: vec!["artist b.d.1".to_string()],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 190,
},
},
@ -229,8 +253,8 @@ macro_rules! library_collection {
"artist b.d.2.1".to_string(),
"artist b.d.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -250,7 +274,11 @@ macro_rules! library_collection {
albums: vec![
Album {
id: AlbumId {
year: 1985,
date: AlbumDate {
year: 1985,
month: AlbumMonth::None,
day: 0,
},
title: "album_title c.a".to_string(),
},
tracks: vec![
@ -260,8 +288,8 @@ macro_rules! library_collection {
title: "track c.a.1".to_string(),
},
artist: vec!["artist c.a.1".to_string()],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 320,
},
},
@ -274,8 +302,8 @@ macro_rules! library_collection {
"artist c.a.2.1".to_string(),
"artist c.a.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -283,7 +311,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2018,
date: AlbumDate {
year: 2018,
month: AlbumMonth::None,
day: 0,
},
title: "album_title c.b".to_string(),
},
tracks: vec![
@ -293,8 +325,8 @@ macro_rules! library_collection {
title: "track c.b.1".to_string(),
},
artist: vec!["artist c.b.1".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1041,
},
},
@ -307,8 +339,8 @@ macro_rules! library_collection {
"artist c.b.2.1".to_string(),
"artist c.b.2.2".to_string(),
],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 756,
},
},
@ -326,7 +358,11 @@ macro_rules! library_collection {
albums: vec![
Album {
id: AlbumId {
year: 1995,
date: AlbumDate {
year: 1995,
month: AlbumMonth::None,
day: 0,
},
title: "album_title d.a".to_string(),
},
tracks: vec![
@ -336,8 +372,8 @@ macro_rules! library_collection {
title: "track d.a.1".to_string(),
},
artist: vec!["artist d.a.1".to_string()],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -350,8 +386,8 @@ macro_rules! library_collection {
"artist d.a.2.1".to_string(),
"artist d.a.2.2".to_string(),
],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 120,
},
},
@ -359,7 +395,11 @@ macro_rules! library_collection {
},
Album {
id: AlbumId {
year: 2028,
date: AlbumDate {
year: 2028,
month: AlbumMonth::None,
day: 0,
},
title: "album_title d.b".to_string(),
},
tracks: vec![
@ -369,8 +409,8 @@ macro_rules! library_collection {
title: "track d.b.1".to_string(),
},
artist: vec!["artist d.b.1".to_string()],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 841,
},
},
@ -383,8 +423,8 @@ macro_rules! library_collection {
"artist d.b.2.1".to_string(),
"artist d.b.2.2".to_string(),
],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 756,
},
},

View File

@ -1,7 +1,7 @@
use musichoard::collection::{
album::{Album, AlbumId},
album::{Album, AlbumDate, AlbumId, AlbumMonth},
artist::{Artist, ArtistId, MusicBrainz},
track::{Format, Quality, Track, TrackId},
track::{Track, TrackFormat, TrackId, TrackQuality},
};
use once_cell::sync::Lazy;
use std::collections::HashMap;

View File

@ -3,7 +3,7 @@ use std::collections::HashMap;
use musichoard::collection::{
album::Album,
artist::Artist,
track::{Format, Track},
track::{Track, TrackFormat},
Collection,
};
use ratatui::{
@ -289,7 +289,9 @@ impl<'a, 'b> AlbumState<'a, 'b> {
"Title: {}\n\
Year: {}",
album.map(|a| a.id.title.as_str()).unwrap_or(""),
album.map(|a| a.id.year.to_string()).unwrap_or_default(),
album
.map(|a| a.id.date.year.to_string())
.unwrap_or_default(),
));
AlbumState {
@ -328,8 +330,8 @@ impl<'a, 'b> TrackState<'a, 'b> {
track.map(|t| t.artist.join("; ")).unwrap_or_default(),
track
.map(|t| match t.quality.format {
Format::Flac => "FLAC".to_string(),
Format::Mp3 => format!("MP3 {}kbps", t.quality.bitrate),
TrackFormat::Flac => "FLAC".to_string(),
TrackFormat::Mp3 => format!("MP3 {}kbps", t.quality.bitrate),
})
.unwrap_or_default(),
));

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@ use once_cell::sync::Lazy;
use std::collections::HashMap;
use musichoard::collection::{
album::{Album, AlbumId},
album::{Album, AlbumDate, AlbumId, AlbumMonth},
artist::{Artist, ArtistId, MusicBrainz},
track::{Format, Quality, Track, TrackId},
track::{Track, TrackFormat, TrackId, TrackQuality},
Collection,
};
@ -33,7 +33,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
]),
albums: vec![Album {
id: AlbumId {
year: 2011,
date: AlbumDate{
year: 2011,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Slovo"),
},
tracks: vec![
@ -43,8 +47,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Az"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 992,
},
},
@ -54,8 +58,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Arkaim"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1061,
},
},
@ -65,8 +69,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Bolno mne"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1004,
},
},
@ -76,8 +80,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Leshiy"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1077,
},
},
@ -87,8 +91,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Zakliatie"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1041,
},
},
@ -98,8 +102,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Predok"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 756,
},
},
@ -109,8 +113,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Nikogda"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1059,
},
},
@ -120,8 +124,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Tam za tumanami"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1023,
},
},
@ -131,8 +135,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Potomok"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 838,
},
},
@ -142,8 +146,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Slovo"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1028,
},
},
@ -153,8 +157,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Odna"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 991,
},
},
@ -164,8 +168,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Vo moiom sadochke…"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 919,
},
},
@ -175,8 +179,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Stenka na stenku"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1039,
},
},
@ -186,8 +190,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Zimushka"),
},
artist: vec![String::from("Аркона")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 974,
},
},
@ -213,7 +217,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
albums: vec![
Album {
id: AlbumId {
year: 2004,
date: AlbumDate{
year: 2004,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Vên [rerecorded]"),
},
tracks: vec![
@ -223,8 +231,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Verja Urit an Bitus"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 961,
},
},
@ -234,8 +242,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Uis Elveti"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1067,
},
},
@ -245,8 +253,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Ôrô"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 933,
},
},
@ -256,8 +264,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Lament"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1083,
},
},
@ -267,8 +275,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Druid"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1073,
},
},
@ -278,8 +286,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Jêzaïg"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1002,
},
},
@ -287,7 +295,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
},
Album {
id: AlbumId {
year: 2008,
date: AlbumDate{
year: 2008,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Slania"),
},
tracks: vec![
@ -297,8 +309,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Samon"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 953,
},
},
@ -308,8 +320,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Primordial Breath"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1103,
},
},
@ -319,8 +331,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Inis Mona"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1117,
},
},
@ -330,8 +342,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Gray Sublime Archon"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1092,
},
},
@ -341,8 +353,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Anagantios"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 923,
},
},
@ -352,8 +364,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Bloodstained Ground"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1098,
},
},
@ -363,8 +375,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Somber Lay"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1068,
},
},
@ -374,8 +386,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Slanias Song"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1098,
},
},
@ -385,8 +397,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Giamonios"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 825,
},
},
@ -396,8 +408,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Tarvos"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1115,
},
},
@ -407,8 +419,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Calling the Rain"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1096,
},
},
@ -418,8 +430,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Elembivos"),
},
artist: vec![String::from("Eluveitie")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1059,
},
},
@ -445,7 +457,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
]),
albums: vec![Album {
id: AlbumId {
year: 2001,
date: AlbumDate{
year: 2001,
month: AlbumMonth::None,
day: 0,
},
title: String::from("…nasze jest królestwo, potęga i chwała na wieki…"),
},
tracks: vec![
@ -455,8 +471,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Intro = Chaos"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1024,
},
},
@ -466,8 +482,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Modlitwa"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1073,
},
},
@ -477,8 +493,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Długa droga z piekła"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1058,
},
},
@ -488,8 +504,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Synowie ognia"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1066,
},
},
@ -499,8 +515,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("1902"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1074,
},
},
@ -510,8 +526,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Krew za krew"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1080,
},
},
@ -521,8 +537,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Kulminacja"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 992,
},
},
@ -532,8 +548,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Judasz"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1018,
},
},
@ -543,8 +559,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Więzy"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1077,
},
},
@ -554,8 +570,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Zagubione dusze"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1033,
},
},
@ -565,8 +581,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Linia życia"),
},
artist: vec![String::from("Frontside")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 987,
},
},
@ -593,7 +609,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
]),
albums: vec![Album {
id: AlbumId {
year: 2011,
date: AlbumDate{
year: 2011,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Paper Plague"),
},
tracks: vec![
@ -603,15 +623,19 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Paper Plague"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 320,
},
},
],
}, Album {
id: AlbumId {
year: 2011,
date: AlbumDate{
year: 2011,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Unbreakable"),
},
tracks: vec![
@ -621,8 +645,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Unbreakable"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 208,
},
},
@ -632,8 +656,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Guilt Trips and Sins"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 205,
},
},
@ -643,8 +667,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Long Goodbye"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 227,
},
},
@ -654,8 +678,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Close Encounters"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 213,
},
},
@ -665,8 +689,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Paranoia"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 218,
},
},
@ -676,8 +700,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Let Me Out of Here"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 207,
},
},
@ -687,8 +711,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Leeches"),
},
artist: vec![String::from("Heavens Basement")],
quality: Quality {
format: Format::Mp3,
quality: TrackQuality {
format: TrackFormat::Mp3,
bitrate: 225,
},
},
@ -714,7 +738,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
albums: vec![
Album {
id: AlbumId {
year: 1984,
date: AlbumDate{
year: 1984,
month: AlbumMonth::None,
day: 0,
},
title: String::from("Ride the Lightning"),
},
tracks: vec![
@ -724,8 +752,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Fight Fire with Fire"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 954,
},
},
@ -735,8 +763,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Ride the Lightning"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 951,
},
},
@ -746,8 +774,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("For Whom the Bell Tolls"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 889,
},
},
@ -757,8 +785,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Fade to Black"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 939,
},
},
@ -768,8 +796,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Trapped under Ice"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 955,
},
},
@ -779,8 +807,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Escape"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 941,
},
},
@ -790,8 +818,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Creeping Death"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 958,
},
},
@ -801,8 +829,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Call of Ktulu"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 888,
},
},
@ -810,7 +838,11 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
},
Album {
id: AlbumId {
year: 1999,
date: AlbumDate{
year: 1999,
month: AlbumMonth::None,
day: 0,
},
title: String::from("S&M"),
},
tracks: vec![
@ -820,8 +852,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Ecstasy of Gold"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 875,
},
},
@ -831,8 +863,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Call of Ktulu"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1030,
},
},
@ -842,8 +874,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Master of Puppets"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1082,
},
},
@ -853,8 +885,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Of Wolf and Man"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1115,
},
},
@ -864,8 +896,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Thing That Should Not Be"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1029,
},
},
@ -875,8 +907,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Fuel"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1057,
},
},
@ -886,8 +918,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("The Memory Remains"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1080,
},
},
@ -897,8 +929,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("No Leaf Clover"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1004,
},
},
@ -908,8 +940,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Hero of the Day"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 962,
},
},
@ -919,8 +951,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Devils Dance"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1076,
},
},
@ -930,8 +962,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Bleeding Me"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 993,
},
},
@ -941,8 +973,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Nothing Else Matters"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 875,
},
},
@ -952,8 +984,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Until It Sleeps"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1038,
},
},
@ -963,8 +995,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("For Whom the Bell Tolls"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1072,
},
},
@ -974,8 +1006,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Human"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1029,
},
},
@ -985,8 +1017,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Wherever I May Roam"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1035,
},
},
@ -996,8 +1028,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Outlaw Torn"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1042,
},
},
@ -1007,8 +1039,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Sad but True"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1082,
},
},
@ -1018,8 +1050,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("One"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 1017,
},
},
@ -1029,8 +1061,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Enter Sandman"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 993,
},
},
@ -1040,8 +1072,8 @@ pub static COLLECTION: Lazy<Vec<Artist>> = Lazy::new(|| -> Collection {
title: String::from("Battery"),
},
artist: vec![String::from("Metallica")],
quality: Quality {
format: Format::Flac,
quality: TrackQuality {
format: TrackFormat::Flac,
bitrate: 967,
},
},