Added the mb db download. Big upsides and downsides
This commit is contained in:
@@ -400,6 +400,8 @@ pub struct AppConfig {
|
||||
pub metadata: MetadataConfigFe,
|
||||
#[serde(default)]
|
||||
pub scheduling: SchedulingConfigFe,
|
||||
#[serde(default)]
|
||||
pub musicbrainz: MusicBrainzConfigFe,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
|
||||
@@ -513,3 +515,36 @@ fn default_lyrics_source() -> String {
|
||||
fn default_cover_art_source() -> String {
|
||||
"coverartarchive".into()
|
||||
}
|
||||
|
||||
// --- MusicBrainz local DB ---
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
|
||||
pub struct MusicBrainzConfigFe {
|
||||
#[serde(default)]
|
||||
pub local_db_path: Option<String>,
|
||||
#[serde(default)]
|
||||
pub auto_update: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize)]
|
||||
pub struct MbStatus {
|
||||
pub has_local_db: bool,
|
||||
#[serde(default)]
|
||||
pub stats: Option<MbLocalStats>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Deserialize)]
|
||||
pub struct MbLocalStats {
|
||||
#[serde(default)]
|
||||
pub artists: u64,
|
||||
#[serde(default)]
|
||||
pub release_groups: u64,
|
||||
#[serde(default)]
|
||||
pub releases: u64,
|
||||
#[serde(default)]
|
||||
pub recordings: u64,
|
||||
#[serde(default)]
|
||||
pub tracks: u64,
|
||||
#[serde(default)]
|
||||
pub last_import_date: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user