Honor nomedia in indexing (fix #24)

pull/37/head
Varun Patil 2022-09-10 17:22:05 -07:00
parent ed7898291e
commit a5e04822ff
1 changed files with 7 additions and 0 deletions

View File

@ -217,6 +217,13 @@ class Index extends Command {
private function parseFolder(Folder &$folder, bool &$refresh): void {
try {
$folderPath = $folder->getPath();
// Respect the '.nomedia' file. If present don't traverse the folder
if ($folder->nodeExists('.nomedia')) {
$this->output->writeln('Skipping folder ' . $folderPath);
return;
}
$this->output->writeln('Scanning folder ' . $folderPath);
$nodes = $folder->getDirectoryListing();