about summary refs log tree commit diff stats
path: root/src/main.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:19:42 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:19:42 +0200
commit72acfb93627918f6fc9c68a5bf5b4ecf34d07a23 (patch)
treee59a493e573b05a4fc5a09f3c6d2702635410bec /src/main.rs
parentperf(raw_update.py)!: Don't fetch entries that are already in the database (diff)
downloadyt-72acfb93627918f6fc9c68a5bf5b4ecf34d07a23.tar.gz
yt-72acfb93627918f6fc9c68a5bf5b4ecf34d07a23.zip
test(benches/update): Init
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index cfd6adc..c223140 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -53,7 +53,7 @@ async fn main() -> Result<()> {
         .init()
         .expect("Let's just hope that this does not panic");
 
-    let app = App::new().await?;
+    let app = App::new(args.db_path.unwrap_or(constants::database()?)).await?;
 
     match args.command.unwrap_or(Command::default()) {
         Command::Download { force } => {
@@ -61,7 +61,9 @@ async fn main() -> Result<()> {
                 invalidate(&app, true).await?;
             }
 
-            download::Downloader::new().consume(&app).await?;
+            download::Downloader::new()
+                .consume(Arc::new(app), max_cache_size)
+                .await?;
         }
         Command::Select { cmd } => {
             let cmd = cmd.unwrap_or(SelectCommand::default());