Used the config-rs crate to allow reading from a config file from /etc/zealot/config.toml and from the home directory
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -3,7 +3,7 @@ use config::Config;
|
||||
use transcoder::repository::Repository;
|
||||
use transcoder::transcoder::Transcoder;
|
||||
|
||||
mod config;
|
||||
mod settings;
|
||||
mod transcoder;
|
||||
mod util;
|
||||
|
||||
@@ -12,8 +12,8 @@ fn main() {
|
||||
log4rs::init_file("./log4rs.yaml", Default::default()).unwrap();
|
||||
|
||||
// create and initialize our config and repository objects
|
||||
let c: Config = Config::new("~/.config/zealot.toml");
|
||||
let r: Repository = Repository::new(&c.get_repository());
|
||||
let c: Config = settings::load_config();
|
||||
let r: Repository = Repository::new(&shellexpand::tilde(&c.get_string("transcoder.repository").unwrap()));
|
||||
|
||||
// create and start the video transcoder object
|
||||
let t: Transcoder = Transcoder::new(c, r);
|
||||
|
Reference in New Issue
Block a user