pinakes-core: improve media management features; various configuration improvements
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I2d1f04f13970d21c36067f30bc04a9176a6a6964
This commit is contained in:
parent
cfdc3d0622
commit
e02c15490e
31 changed files with 1167 additions and 197 deletions
|
|
@ -90,9 +90,17 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
|
||||
let config_path = resolve_config_path(cli.config.as_deref());
|
||||
info!(path = %config_path.display(), "loading configuration");
|
||||
|
||||
let mut config = Config::load_or_default(&config_path)?;
|
||||
let mut config = if config_path.exists() {
|
||||
info!(path = %config_path.display(), "loading configuration from file");
|
||||
Config::from_file(&config_path)?
|
||||
} else {
|
||||
info!(
|
||||
"using default configuration (no config file found at {})",
|
||||
config_path.display()
|
||||
);
|
||||
Config::default()
|
||||
};
|
||||
config.ensure_dirs()?;
|
||||
config
|
||||
.validate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue