Skip to content

armgit / ente

Public Imported from GitHub
0

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

Better log

Manav Rathi80802d44e360
diff --git a/web/apps/photos/src/worker/ffmpeg.worker.ts b/web/apps/photos/src/worker/ffmpeg.worker.ts
index a9f2ad56bc..03893efba6 100644
--- a/web/apps/photos/src/worker/ffmpeg.worker.ts
+++ b/web/apps/photos/src/worker/ffmpeg.worker.ts
@@ -64,7 +64,7 @@ const ffmpegExec = async (
try {
ffmpeg.FS("writeFile", inputPath, inputData);
- log.info(`Running FFmpeg (wasm) command ${cmd}`);
+ log.debug(() => `[wasm] ffmpeg ${cmd.join(" ")}`);
await ffmpeg.run(...cmd);
return ffmpeg.FS("readFile", outputPath);
@@ -98,14 +98,16 @@ const substitutePlaceholders = (
inputFilePath: string,
outputFilePath: string,
) =>
- command.map((segment) => {
- if (segment == ffmpegPathPlaceholder) {
- return "";
- } else if (segment == inputPathPlaceholder) {
- return inputFilePath;
- } else if (segment == outputPathPlaceholder) {
- return outputFilePath;
- } else {
- return segment;
- }
- });
+ command
+ .map((segment) => {
+ if (segment == ffmpegPathPlaceholder) {
+ return undefined;
+ } else if (segment == inputPathPlaceholder) {
+ return inputFilePath;
+ } else if (segment == outputPathPlaceholder) {
+ return outputFilePath;
+ } else {
+ return segment;
+ }
+ })
+ .filter((c) => !!c);