Added the mb db download. Big upsides and downsides
This commit is contained in:
@@ -41,6 +41,9 @@ pub struct AppConfig {
|
||||
|
||||
#[serde(default)]
|
||||
pub subsonic: SubsonicConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub musicbrainz: MusicBrainzConfig,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -166,6 +169,18 @@ pub struct SubsonicConfig {
|
||||
pub transcoding_enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||
pub struct MusicBrainzConfig {
|
||||
/// Path to the local MusicBrainz SQLite database (shanty-mb.db).
|
||||
/// If None, only the remote API is used.
|
||||
#[serde(default)]
|
||||
pub local_db_path: Option<PathBuf>,
|
||||
|
||||
/// Automatically re-download and re-import dumps weekly.
|
||||
#[serde(default)]
|
||||
pub auto_update: bool,
|
||||
}
|
||||
|
||||
impl Default for SubsonicConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
@@ -203,6 +218,7 @@ impl Default for AppConfig {
|
||||
metadata: MetadataConfig::default(),
|
||||
scheduling: SchedulingConfig::default(),
|
||||
subsonic: SubsonicConfig::default(),
|
||||
musicbrainz: MusicBrainzConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user