From e352cd71cd161129044bfd1c075a97bbdc4080ad Mon Sep 17 00:00:00 2001 From: Moe Alam Date: Tue, 19 Jan 2021 20:52:16 -0800 Subject: [PATCH] use `find` command instead of `fs.readdir` for orphanVideoCheck+ --- libs/video/utils.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libs/video/utils.js b/libs/video/utils.js index 77b0b5ac..4bd7f317 100644 --- a/libs/video/utils.js +++ b/libs/video/utils.js @@ -76,19 +76,10 @@ module.exports = (s,config,lang) => { let filename = filePath.split('/') filename = filename[filename.length - 1] if(!filename)return; - // onData(filePath) - console.log('##################################################') - console.log(filePath) - console.log(filename) - const checkResponse = await checkIfVideoIsOrphaned(monitor,videosDirectory,filename) if(checkResponse.status === 2){ ++orphanedFilesCount } - console.log(checkResponse) - console.log(videosFound) - console.log(videosFound === options.checkMax) - console.log('##################################################') ++videosFound if(videosFound === options.checkMax){ @@ -100,7 +91,6 @@ module.exports = (s,config,lang) => { var i; for (i = 0; i < filePathLines.length; i++) { await processLine(filePathLines[i]) - console.log(`${i} ##################################################`) } }) listing.stderr.on('data', d=>onError(d.toString()))