()
| 14766 | // Leave retryable — typed placeholders used to stick forever on Docker grids. |
| 14767 | await window.electron.saveThumbnail(model.filePath, '3d.png'); |
| 14768 | if (!skipHash && (!model.hash || model.hash === '')) { |
| 14769 | try { await window.electron.calculateFileHash(model.filePath); } catch (e) { /* ignore */ } |
| 14770 | } |
| 14771 | return; |
| 14772 | } |
| 14773 | |
| 14774 | // 0d. LYS: pull embedded preview.png; otherwise render the mesh |
| 14775 | if (fileExt === 'lys') { |
| 14776 | console.log( |
| 14777 | `[DEBUG] generateThumbnailsForModels: Attempting to extract embedded thumbnail for ${model.filePath}` |
| 14778 | ); |
| 14779 | try { |
| 14780 | const embeddedImages = await extractLYSThumbnail(model.filePath); |
| 14781 | if (embeddedImages && embeddedImages.length > 0) { |
| 14782 | const validImages = embeddedImages.filter( |
| 14783 | (im) => typeof im === 'string' && im.startsWith('data:image') |
| 14784 | ); |
| 14785 | if (validImages.length > 0) { |
| 14786 | thumbnail = validImages[0]; |
| 14787 | await window.electron.addMultipleThumbnails(model.filePath, validImages); |
no test coverage detected