feat(scanner): skip folders containing a .nomedia file

Folders with a .nomedia file are now skipped during scans, the same way as
folders with an empty .ndignore file. The file contents are ignored, and it
takes precedence over any .ndignore in the same folder. .nomedia is the
marker used by Kodi, Plex and Android to exclude folders from media scans,
so libraries already set up for those tools work without extra files.

Note: folders that only use .nomedia to hide cover art from Android gallery
apps will no longer be scanned.
This commit is contained in:
Deluan 2026-09-14 08:51:56 -04:00
commit c67c19c302
5 changed files with 29 additions and 4 deletions

View file

@ -88,6 +88,7 @@ const (
I18nFolder = "i18n"
ScanIgnoreFile = ".ndignore"
NoMediaFile = ".nomedia"
ArtworkFolder = "artwork"
// HashedArtworkFolder is a subtree of ArtworkFolder, kept apart from the name-addressed
// upload folders beside it so Prune's sweep never reaches them.