Fix errors

This commit is contained in:
Manav Rathi 2024-04-08 20:56:18 +05:30
parent 92a3650696
commit f92a4c2a6e
No known key found for this signature in database
4 changed files with 7 additions and 8 deletions

View file

@ -132,7 +132,7 @@ export default function AlbumCastDialog(props: Props) {
session
.sendMessage("urn:x-cast:pair-request", {})
.then(() => {
log.debug("Message sent successfully");
log.debug(() => "Message sent successfully");
})
.catch((e) => {
log.error("Error sending message", e);

View file

@ -1,8 +1,8 @@
import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { eventBus, Events } from "@ente/shared/events";
import { addLogLine } from "@ente/shared/logging";
import { logError } from "@ente/shared/sentry";
import { getToken, getUserID } from "@ente/shared/storage/localStorage/helpers";
import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { FILE_TYPE } from "constants/file";
import debounce from "debounce";
import PQueue from "p-queue";

View file

@ -25,10 +25,10 @@ import UploadService from "./uploadService";
import uploader from "./uploader";
import { getFileNameSize } from "@/next/file";
import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { getDedicatedCryptoWorker } from "@ente/shared/crypto";
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
import { addLogLine } from "@ente/shared/logging";
import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { Remote } from "comlink";
import { UPLOAD_RESULT, UPLOAD_STAGES } from "constants/upload";
import isElectron from "is-electron";

View file

@ -1,13 +1,13 @@
import ElectronAPIs from "@/next/electron";
import { convertBytesToHumanReadable } from "@/next/file";
import log from "@/next/log";
import { workerBridge } from "@/next/worker/worker-bridge";
import ComlinkCryptoWorker from "@ente/shared/crypto";
import { CustomError } from "@ente/shared/error";
import { isPlaybackPossible } from "@ente/shared/media/video-playback";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types";
import { downloadUsingAnchor } from "@ente/shared/utils";
import { workerBridge } from "@ente/shared/worker/worker-bridge";
import {
FILE_TYPE,
RAW_FORMATS,
@ -489,10 +489,9 @@ const convertToJPEGInElectron = async (
try {
const startTime = Date.now();
const inputFileData = new Uint8Array(await fileBlob.arrayBuffer());
const convertedFileData = await workerBridge.convertToJPEG(
inputFileData,
filename,
);
const convertedFileData = isElectron()
? await ElectronAPIs.convertToJPEG(inputFileData, filename)
: await workerBridge.convertToJPEG(inputFileData, filename);
log.info(
`originalFileSize:${convertBytesToHumanReadable(
fileBlob?.size,