Remove automatic cache scan on startup
- Cache is now only refreshed when user presses 'r' - Empty cache on first launch - user must manually scan - More explicit control over library updates
This commit is contained in:
parent
c0fd204b97
commit
43951a200d
12
src/main.rs
12
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()?;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user