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

Function getModelFilePath

renderer.js:17112–17132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17110 if (!thumbnail) {
17111 thumbnail = await new Promise((resolve, reject) => {
17112 renderQueue.push({
17113 filePath: file.filePath,
17114 container: document.createElement('div'), // Dummy container (not in DOM)
17115 existingThumbnail: null,
17116 resolve,
17117 reject,
17118 // Must survive pruneDisconnectedRenderTasks — dummy is never isConnected.
17119 retainDetached: true,
17120 thumbPriority: THUMB_PRIORITY_BACKGROUND
17121 });
17122 processRenderQueue();
17123 });
17124
17125 if (thumbnail) {
17126 await window.electron.saveThumbnail(file.filePath, thumbnail);
17127 }
17128 }
17129
17130 // Calculate and save hash during thumbnail generation (file is already being read)
17131 if (!file.hash || file.hash === '') {
17132 try {
17133 await window.electron.calculateFileHash(file.filePath);
17134 } catch (hashError) {
17135 console.error(`Error calculating hash for ${file.filePath}:`, hashError);

Callers 1

addTagToModelFunction · 0.85

Calls 1

getCurrentModelFilePathFunction · 0.85

Tested by

no test coverage detected