diff --git a/src/main.rs b/src/main.rs index c70a05b..62f77fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,20 +31,12 @@ async fn main() -> Result<()> { tracing::info!("Loaded config from {:?}", config_path); - // Load cache - let mut cache = cache::Cache::load(&cache_dir) + // Load cache (empty if doesn't exist - user must press 'r' to scan) + let cache = cache::Cache::load(&cache_dir) .context("Failed to load cache")?; tracing::info!("Loaded cache from {:?}", cache_dir); - // If cache is empty and we have scan paths, perform initial scan - if cache.file_tree.is_empty() && !config.scan_paths.paths.is_empty() { - tracing::info!("Cache is empty, performing initial scan..."); - cache = scanner::scan_paths(&config.scan_paths.paths)?; - cache.save(&cache_dir)?; - tracing::info!("Initial scan complete, cache saved"); - } - // Initialize player let mut player = player::Player::new()?;