Add logging, fix devenv up

This commit is contained in:
Alexander
2026-06-30 12:17:48 +02:00
parent ebf1c5b5e1
commit d1e1ac97c4
32 changed files with 1549 additions and 129 deletions
+3
View File
@@ -11,6 +11,7 @@ use std::os::unix::fs::MetadataExt;
use crate::music::parse::parse_music_metadata_for_path;
use crate::origins::attrs::FileAttrs;
use crate::server::manifest::ManifestEntry;
use tracing::info;
/// Server-side entry for one file. Built once on startup from a directory
/// scan and refreshed by the watcher on inotify events.
@@ -38,11 +39,13 @@ impl ServerState {
/// and on watcher-driven reconciliations.
pub fn replace_all(&self, source: &Path) -> io::Result<()> {
let entries = scan_directory(source)?;
let count = entries.len();
let mut map = self.inner.lock().unwrap();
map.clear();
for (id, entry) in entries {
map.insert(id, entry);
}
info!(count, "server state: scan complete");
return Ok(());
}