fix: scan extensions add jpg/png, /files status from DB (2/4 M4 items)

This commit is contained in:
Accusys
2026-05-13 20:43:37 +08:00
parent 50d38a5473
commit 2e7dd44552
3 changed files with 6 additions and 6 deletions

View File

@@ -94,7 +94,7 @@ async fn list_files(
file_uuid: r.file_uuid,
file_name: r.file_name,
file_path: r.file_path,
status: "ready".to_string(), // Hardcoded for now
status: r.status.unwrap_or_default(),
})
.collect();

View File

@@ -1891,7 +1891,7 @@ async fn scan_files(State(state): State<AppState>) -> Result<Json<ScanFilesRespo
.unwrap_or_else(|_| "/Users/accusys/momentry/var/sftpgo/data/demo".to_string());
let demo_dir = std::path::Path::new(&demo_dir_str);
let allowed_extensions = vec!["mp4", "mov", "mkv", "avi", "webm"];
let allowed_extensions = vec!["mp4", "mov", "mkv", "avi", "webm", "jpg", "jpeg", "png", "gif", "webp"];
// 1. Get registered files from DB (Map key: absolute file_path)
let table = schema::table_name("videos");