From d81887bf65db41be30f48713448da319c11ce336 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 22 Nov 2022 09:39:45 -0800 Subject: [PATCH] release: v4.8.0 --- appinfo/info.xml | 2 +- lib/Command/Index.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 9ae17a28a..a4dfda0e2 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -33,7 +33,7 @@ Memories is a *batteries-included* photo management solution for Nextcloud with 1. Run `php ./occ memories:index` to generate metadata indices for existing photos. 1. Open the 📷 Memories app in Nextcloud and set the directory containing your photos. ]]> - 4.7.2 + 4.8.0 agpl Varun Patil Memories diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 3208ff167..c988eda7b 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -268,6 +268,11 @@ private function parseFolder(Folder &$folder, bool &$refresh, int $progress_i, i return; } + // check path contains IMDB then skip + if (false !== strpos($folderPath, 'IMDB')) { + return; + } + $nodes = $folder->getDirectoryListing(); foreach ($nodes as $i => &$node) { @@ -287,16 +292,21 @@ private function parseFolder(Folder &$folder, bool &$refresh, int $progress_i, i } } - private function parseFile(File &$file, bool &$refresh): void + private function parseFile(File &$file, bool &$refresh): bool { // Process the file $res = $this->timelineWrite->processFile($file, $refresh); if (2 === $res) { ++$this->nProcessed; - } elseif (1 === $res) { + + return true; + } + if (1 === $res) { ++$this->nSkipped; } else { ++$this->nInvalid; } + + return false; } }