(models)
| 1383 | if (model) { |
| 1384 | model.thumbnail = thumbnail; |
| 1385 | model.hasThumbnail = true; |
| 1386 | } |
| 1387 | } |
| 1388 | const host = liveThumbnailContainer(filePath, container); |
| 1389 | const img = host && host.querySelector('img'); |
| 1390 | if (img) img.src = thumbnail; |
| 1391 | } |
| 1392 | |
| 1393 | function scheduleDeferredThumbnailPass() { |
| 1394 | if (deferredSlowThumbnails.size === 0) return; |
| 1395 | if (renderQueue.length > 0 || activeRenders > 0 || activeSlowThumbRenders > 0) return; |
| 1396 | if (window._serverBulkThumbnailJobActive) return; |
| 1397 | |
| 1398 | const room = Math.max(0, RENDER_QUEUE_SOFT_CAP - renderQueue.length); |
| 1399 | if (room === 0) return; |
| 1400 | const batch = []; |
| 1401 | for (const [path, item] of deferredSlowThumbnails) { |
| 1402 | if (batch.length >= room) break; |
| 1403 | batch.push(item); |
| 1404 | deferredSlowThumbnails.delete(path); |
| 1405 | } |
| 1406 | if (batch.length === 0) return; |
| 1407 | const waiting = deferredSlowThumbnails.size; |
no test coverage detected