From b22173a63174acda8a966bc12b264ac6f87b9267 Mon Sep 17 00:00:00 2001 From: Cassie Esposito Date: Tue, 24 May 2022 17:30:16 -0700 Subject: [PATCH] Undoing changes caused by linter run amok --- server/utils/scandir.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/utils/scandir.js b/server/utils/scandir.js index 25258d71..f94e015c 100644 --- a/server/utils/scandir.js +++ b/server/utils/scandir.js @@ -330,10 +330,12 @@ async function getLibraryItemFileData(libraryMediaType, folder, libraryItemPath, var fileItems = [] if (isSingleMediaItem) { // Single media item in root of folder - fileItems = [{ + fileItems = [ + { fullpath: libraryItemPath, path: libraryItemDir // actually the relPath (only filename here) - }] + } + ] libraryItemData = { path: libraryItemPath, // full path relPath: libraryItemDir, // only filename @@ -366,10 +368,10 @@ async function getLibraryItemFileData(libraryMediaType, folder, libraryItemPath, for (let i = 0; i < fileItems.length; i++) { var fileItem = fileItems[i] var newLibraryFile = new LibraryFile() - // fileItem.path is the relative path + // fileItem.path is the relative path await newLibraryFile.setDataFromPath(fileItem.fullpath, fileItem.path) libraryItem.libraryFiles.push(newLibraryFile) } return libraryItem } -module.exports.getLibraryItemFileData = getLibraryItemFileData \ No newline at end of file +module.exports.getLibraryItemFileData = getLibraryItemFileData