From 9774b2cfa50b235a17406e0985723d3454f31433 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 4 Dec 2024 16:30:35 -0600 Subject: [PATCH] Update JSDocs for groupFileItemsIntoLibraryItemDirs --- server/utils/scandir.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/utils/scandir.js b/server/utils/scandir.js index a70e09bb..f59d0a5b 100644 --- a/server/utils/scandir.js +++ b/server/utils/scandir.js @@ -34,7 +34,7 @@ module.exports.checkFilepathIsAudioFile = checkFilepathIsAudioFile /** * @param {string} mediaType - * @param {{name:string, path:string, dirpath:string, reldirpath:string, fullpath:string, extension:string, deep:number}[]} fileItems (see recurseFiles) + * @param {import('./fileUtils').FilePathItem[]} fileItems * @param {boolean} [audiobooksOnly=false] * @returns {Record} map of files grouped into potential libarary item dirs */ @@ -46,7 +46,9 @@ function groupFileItemsIntoLibraryItemDirs(mediaType, fileItems, audiobooksOnly // Step 2: Seperate media files and other files // - Directories without a media file will not be included + /** @type {import('./fileUtils').FilePathItem[]} */ const mediaFileItems = [] + /** @type {import('./fileUtils').FilePathItem[]} */ const otherFileItems = [] itemsFiltered.forEach((item) => { if (isMediaFile(mediaType, item.extension, audiobooksOnly)) mediaFileItems.push(item)