From c3ef3055fd2db237697a25bcab10d99062888d9d Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 26 Jan 2022 10:10:25 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix=20for=20a=20missing=20key=20?= =?UTF-8?q?in=20IFolderData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/api.service.ts | 5 ++--- utils/uncompression.utils.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/services/api.service.ts b/services/api.service.ts index f5b590f..98953b1 100644 --- a/services/api.service.ts +++ b/services/api.service.ts @@ -128,7 +128,7 @@ export default class ApiService extends Service { }, } ); - const fileCopyDelaySeconds = 10; + const fileCopyDelaySeconds = 30; const checkFileCopyComplete = (path, previousPath) => { fs.stat(path, async (err, stat) => { if (err) { @@ -146,11 +146,10 @@ export default class ApiService extends Service { await broker.call("import.walkFolders", { basePathToWalk: path, }); - console.log(walkedFolder); await this.broker.call("libraryqueue.enqueue", { fileObject: { filePath: walkedFolder[0].filePath, - size: walkedFolder[0].fileSize, + fileSize: walkedFolder[0].fileSize, }, }); } else { diff --git a/utils/uncompression.utils.ts b/utils/uncompression.utils.ts index c356a94..f5e1bf7 100644 --- a/utils/uncompression.utils.ts +++ b/utils/uncompression.utils.ts @@ -55,7 +55,7 @@ export const extractCoverFromFile2 = async ( fileObject: any ): Promise => { try { - const { filePath, fileSize} = fileObject; + const { filePath, fileSize } = fileObject; const calibre = new Calibre(); console.info(`Initiating extraction process for path ${filePath}`);