Add sidecar metadata files
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user