Add sidecar metadata files
Some checks failed
CI / Typos (push) Successful in 24s
CI / Clippy (push) Failing after 59s
CI / Build and test (push) Failing after 1m7s

This commit is contained in:
2026-03-05 22:02:38 -08:00
parent a9e402bc83
commit 16f1e38087
8 changed files with 122 additions and 12 deletions

View File

@@ -13,6 +13,10 @@ pub mod objectpath;
pub static INIT_DB_TOML: &str = include_str!("./config.toml");
fn default_true() -> bool {
true
}
#[test]
#[expect(clippy::expect_used)]
fn init_db_toml_valid() {
@@ -46,8 +50,21 @@ pub struct DatasetConfig {
#[serde(tag = "type")]
#[serde(rename_all = "lowercase")]
pub enum Source {
/// A directory of FLAC files
Flac { path: OneOrMany<PathBuf> },
/// A directory files
Filesystem {
/// The directories to scan.
/// Must be relative.
#[serde(alias = "paths")]
path: OneOrMany<PathBuf>,
/// If true, all toml files are ignored.
/// Metadata can be added to any file using a {filename}.toml.
///
/// If false, toml files are treated as regular files
/// and sidecar metadata is disabled.
#[serde(default = "default_true")]
sidecars: bool,
},
}
//