Auto-Commit: 2026-09-21 00:51:22
This commit is contained in:
1 parent
bc234895d6
commit
244057be05
2 files changed
+37
No files matched your search
@@ -0,0 +1,23 @@
|
||||
const fs = require('fs');
|
||||
|
||||
let scan = fs.readFileSync('src/lib/scanner/index.ts', 'utf8');
|
||||
|
||||
// Add thumbnailReady to select
|
||||
scan = scan.replace(
|
||||
'select: { id: true, relativePath: true, fileSize: true, lastModified: true },',
|
||||
'select: { id: true, relativePath: true, fileSize: true, lastModified: true, thumbnailReady: true },'
|
||||
);
|
||||
|
||||
// Add enqueue condition in else block
|
||||
scan = scan.replace(
|
||||
' unchanged++;\n dbPaths.delete(relPath);\n }',
|
||||
` unchanged++;
|
||||
dbPaths.delete(relPath);
|
||||
if (existing.thumbnailReady === false) {
|
||||
enqueueProcessing(relPath, getMediaType(file.ext)).catch(console.error);
|
||||
console.log('Re-queued missing thumbnail:', relPath);
|
||||
}
|
||||
}`
|
||||
);
|
||||
|
||||
fs.writeFileSync('src/lib/scanner/index.ts', scan, 'utf8');
|
||||
Reference in new issue
Block a user