From fc9cd7a887e5f6863111cce154557873680cd0bb Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 2 Nov 2024 15:31:20 +0100 Subject: fix(yt/download): Don't trust the `cache_path` attribute --- yt/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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?; } -- cgit 1.4.1