π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Reuse
Manav Rathi2d2140eaca8b
diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.tsindex 54925c8298..df52268df2 100644--- a/web/packages/new/photos/services/ml/worker.ts+++ b/web/packages/new/photos/services/ml/worker.ts@@ -364,7 +364,6 @@ const index = async () => {const f = fileLogID(enteFile);const fileID = enteFile.id;- const startTime = Date.now();// Massage the existing data (if any) that we got from remote to the form// that the rest of this function operates on.@@ -429,6 +428,8 @@ const index = async (let faceIndex: FaceIndex;let clipIndex: CLIPIndex;+ const startTime = Date.now();+try {[faceIndex, clipIndex] = await Promise.all([existingFaceIndex ?? indexFaces(enteFile, image, electron),@@ -443,17 +444,19 @@ const index = async (log.debug(() => {const ms = Date.now() - startTime;- const nf = faceIndex.faces.length;- return `Indexed ${nf} faces and clip in ${f} (${ms} ms)`;+ const msg = [];+ if (!existingFaceIndex) msg.push(`${faceIndex.faces.length} faces`);+ if (!existingCLIPIndex) msg.push("clip");+ return `Indexed ${msg.join(" and ")} clip in ${f} (${ms} ms)`;});- const remoteFaceIndex = {+ const remoteFaceIndex = existingRemoteFaceIndex ?? {version: faceIndexingVersion,client: userAgent,...faceIndex,};- const remoteCLIPIndex = {+ const remoteCLIPIndex = existingRemoteCLIPIndex ?? {version: clipIndexingVersion,client: userAgent,...clipIndex,