Make utils.recFindByExt and utils.getDownloadedFilesByType async

This commit is contained in:
Tiger Oakes
2020-09-26 15:22:57 -07:00
parent f535d18cb9
commit 21eafeab22
3 changed files with 55 additions and 75 deletions

View File

@@ -184,7 +184,7 @@ async function importUnregisteredFiles() {
// run through check list and check each file to see if it's missing from the db
dirs_to_check.forEach(dir_to_check => {
// recursively get all files in dir's path
const files = utils.getDownloadedFilesByType(dir_to_check.basePath, dir_to_check.type);
const files = await utils.getDownloadedFilesByType(dir_to_check.basePath, dir_to_check.type);
files.forEach(file => {
// check if file exists in db, if not add it