From b5c979df2e3db394bba69939fbcebcc584754262 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 22 Jan 2024 13:52:07 +0100 Subject: [PATCH] fix: Ignore paths that begin with underscore (#73) --- src/scanner.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/scanner.ts b/src/scanner.ts index 3573544..0f6427e 100644 --- a/src/scanner.ts +++ b/src/scanner.ts @@ -39,6 +39,10 @@ export default function (logger: Logger, db: MediaDatabase, config: Record { const mediaId = getId(config.paths.media, mediaPath) + + // Filter out files that are not to be scanned + if (!shouldFileBeScanned(mediaId, mediaPath)) return + try { if (!mediaStat) { await db.remove(await db.get(mediaId)) @@ -148,4 +152,16 @@ export default function (logger: Logger, db: MediaDatabase, config: Record