Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[desktop] Ignore imagemagick on ARM in one more place

Manav Rathi78a649cae387
diff --git a/desktop/src/main/services/image.ts b/desktop/src/main/services/image.ts
index 8f72caedd7..c07b051a1a 100644
--- a/desktop/src/main/services/image.ts
+++ b/desktop/src/main/services/image.ts
@@ -45,6 +45,9 @@ const convertToJPEGCommand = (
];
case "linux":
+ // The bundled binary is an ELF x86-64 executable.
+ if (process.arch != "x64")
+ throw new Error(CustomErrorMessage.NotAvailable);
return [
imageMagickPath(),
inputFilePath,
@@ -90,6 +93,7 @@ export const generateImageThumbnail = async (
let thumbnail: Uint8Array;
do {
await execAsync(command);
+ // TODO(MR): release 1.7
// TODO(MR): imagemagick debugging. Remove me after verifying logs.
log.info(`Generated thumbnail using ${command.join(" ")}`);
thumbnail = new Uint8Array(await fs.readFile(outputFilePath));
diff --git a/web/apps/photos/src/services/upload/uploadService.ts b/web/apps/photos/src/services/upload/uploadService.ts
index 52f495785a..403fdbb88b 100644
--- a/web/apps/photos/src/services/upload/uploadService.ts
+++ b/web/apps/photos/src/services/upload/uploadService.ts
@@ -1023,6 +1023,8 @@ const withThumbnail = async (
} catch (e) {
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
moduleState.isNativeImageThumbnailGenerationNotAvailable = true;
+ // TODO(MR): release 1.7
+ log.info("Setting isNativeImageThumbnailGenerationNotAvailable", e);
} else {
log.error("Native thumbnail generation failed", e);
}
diff --git a/web/apps/photos/src/utils/file/index.ts b/web/apps/photos/src/utils/file/index.ts
index af5c06e8e0..4f9ec18459 100644
--- a/web/apps/photos/src/utils/file/index.ts
+++ b/web/apps/photos/src/utils/file/index.ts
@@ -309,6 +309,8 @@ export const getRenderableImage = async (fileName: string, imageBlob: Blob) => {
} catch (e) {
if (e.message.endsWith(CustomErrorMessage.NotAvailable)) {
moduleState.isNativeJPEGConversionNotAvailable = true;
+ // TODO(MR): release 1.7
+ log.info("Setting isNativeJPEGConversionNotAvailable", e);
} else {
log.error("Native conversion to JPEG failed", e);
}