fix name doubling

This commit is contained in:
Alexandra
2024-10-22 00:49:26 -06:00
parent 1aa7791ecf
commit 4facb78bc0
2 changed files with 4 additions and 1 deletions

View File

@@ -84,6 +84,9 @@ function findCategory(str, catList){
foundCat = "Others"
}
}
if(foundSubCat.includes(foundCat)){
foundCat = ''
}
return `${foundCat} ${foundSubCat}`.trim()
}

View File

@@ -50,9 +50,9 @@ async function getFilesJob() {
console.log("Updating the file list.");
fileList = await getAllFiles(categoryList);
await FileHandler.saveJsonFile(fileListPath, fileList);
fileCount = fileList.length;
if (typeof search !== "undefined") {
await search.createIndex(fileList, searchFields); //recreate the search index
fileCount = fileList.length;
//fileList = []
}
crawlTime = await FileHandler.fileTime(fileListPath);