about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--yt/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt/src/main.rs b/yt/src/main.rs
index d4cd2b6..2049183 100644
--- a/yt/src/main.rs
+++ b/yt/src/main.rs
@@ -17,7 +17,7 @@ use std::{collections::HashMap, fs, sync::Arc};
 use anyhow::{bail, Context, Result};
 use app::App;
 use bytes::Bytes;
-use cache::invalidate;
+use cache::{invalidate, maintain};
 use clap::Parser;
 use cli::{CacheCommand, CheckCommand, SelectCommand, SubscriptionCommand, VideosCommand};
 use config::Config;
@@ -96,6 +96,7 @@ async fn main() -> Result<()> {
                 max_cache_size.unwrap_or(app.config.download.max_cache_size.as_u64());
             info!("Max cache size: '{}'", Bytes::new(max_cache_size));
 
+            maintain(&app, false).await?;
             if force {
                 invalidate(&app, true).await?;
             }