about summary refs log tree commit diff stats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 7852aa0..a6766f6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -15,6 +15,7 @@ use app::App;
 use cache::invalidate;
 use clap::Parser;
 use cli::{CacheCommand, CheckCommand, SelectCommand, SubscriptionCommand};
+use config::Config;
 use log::info;
 use select::cmds::handle_select_cmd;
 use tokio::{
@@ -31,6 +32,7 @@ pub mod cli;
 
 pub mod cache;
 pub mod comments;
+pub mod config;
 pub mod constants;
 pub mod download;
 pub mod select;
@@ -54,7 +56,8 @@ async fn main() -> Result<()> {
         .init()
         .expect("Let's just hope that this does not panic");
 
-    let app = App::new(args.db_path.unwrap_or(constants::database()?)).await?;
+    let config = Config::from_config_file(args.db_path, args.config_path)?;
+    let app = App::new(config).await?;
 
     match args.command.unwrap_or(Command::default()) {
         Command::Download {