fix: exhaustive generic parser and implement local archive history

This commit is contained in:
ergosteur
2026-03-07 05:05:08 -05:00
parent 5267dab236
commit 103ce6f207
3 changed files with 262 additions and 198 deletions

View File

@@ -43,8 +43,13 @@ app.get('/api/archives', (req, res) => {
const archives = items
.filter(item => {
const isDir = item.isDirectory();
if (!isDir) console.log(`[API] Skipping non-directory: ${item.name}`);
return isDir;
const isHidden = item.name.startsWith('.') || item.name.startsWith('@') || item.name.startsWith('_');
if (!isDir) return false;
if (isHidden) {
console.log(`[API] Skipping system/hidden directory: ${item.name}`);
return false;
}
return true;
})
.map(item => {
// Try to find a profile pic or first image for the thumbnail