Skip to content

Commit

Permalink
Respect .noimage and .nomedia files
Browse files Browse the repository at this point in the history
Fixes #75

When a folder has a .noimage or .nomedia node. Just don't show the
folder in the album overview. Ignore it and do not traverse it.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Jan 27, 2020
1 parent 85ea3ae commit 5acd996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Controller/AlbumsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ private function scanFolder(Folder $folder, int $depth, bool $shared): iterable
return [];
}

// Ignore folder with a .noimage or .nomedia node
if ($folder->nodeExists('.noimage') || $folder->nodeExists('.nomedia')) {
return [];
}

$nodes = $folder->getDirectoryListing();

foreach ($nodes as $node) {
Expand Down

0 comments on commit 5acd996

Please sign in to comment.