MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / startPeriodicSTLHomeScan

Function startPeriodicSTLHomeScan

renderer.js:8381–8407  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8379 if (serverJob.backgrounded || serverJob.cancelled) {
8380 return;
8381 }
8382 await window.electron.showMessage('Success', 'Thumbnail generation completed successfully.');
8383 invalidatePrimaryThumbnailCache();
8384 const sortSelect = document.getElementById('sort-select');
8385 const models = await window.electron.getAllModels(sortSelect ? sortSelect.value : 'date-desc', 0);
8386 await renderFiles(models);
8387 return;
8388 }
8389
8390 const progress = window.ThumbnailProgress;
8391 progress?.show({
8392 title: 'Generate Missing Thumbnails',
8393 phase: 'Loading model details...',
8394 total: modelsWithoutThumbs.length,
8395 cancellable: false
8396 });
8397
8398 // Get full model data for the models without thumbnails
8399 const fullModels = [];
8400 let loadedCount = 0;
8401 for (const model of modelsWithoutThumbs) {
8402 const fullModel = await window.electron.getModel(model.filePath);
8403 if (fullModel) {
8404 fullModels.push(fullModel);
8405 }
8406 loadedCount++;
8407 progress?.update(loadedCount, modelsWithoutThumbs.length);
8408 }
8409
8410 // Generate thumbnails for models without them

Callers 2

saveSTLHomeFromDialogFunction · 0.85
renderer.jsFile · 0.85

Calls 1

stopPeriodicSTLHomeScanFunction · 0.85

Tested by

no test coverage detected