Added the mb db download. Big upsides and downsides
All checks were successful
CI / check (push) Successful in 1m11s
CI / docker (push) Successful in 2m21s

This commit is contained in:
Connor Johnstone
2026-03-21 23:22:49 -04:00
parent 31d54651e6
commit 51f2c2ae8f
9 changed files with 2181 additions and 142 deletions

View File

@@ -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(),
}
}
}