Exclude Content From Library
.ndignore to exclude content from being added to Navidrome’s libraryOverview
Navidrome allows the usage of a .ndignore file to exclude content from being added to Navidrome’s library. These files can be used in the following ways:
- A blank
.ndignorefile can be added to a directory, and as a result Navidrome will ignore that folder and its subfolders from being added to Navidrome’s library. - A
.ndignorefile also supports.gitignoresyntax inside of it to set rules for content to exclude. This allows you to place a single file in your parent Music folder and then use a single file to establish rules on ignoring certain folders, filetypes, or files.
Key behaviors
- Cascading: Patterns from parent directories apply to all subdirectories
- Multiple files: You can place
.ndignorefiles in different directories
A new or updated .ndignore file should be auto-detected by Navidrome, or can be detected with a Quick Scan.
Syntax Usage and Examples
A single .ndignore can be placed at the parent folder of your library and then syntax added to it.
For example, if your ~/Music folder is mounted to Navidrome then you could create ~/Music/.ndignore and add syntax to it. The following examples assume the .ndignore is placed in the parent folder of your library:
# .ndignore supports comments starting with '#'
# Ignore all .flac
*.flac
# ignore specific folders
/untagged/
/unsorted/
# Negate the .flac ignore rule for a favorite album.
!/thursday/taking-inventory-of-a-frozen-lake/*.flac
Limitations
- Brace expansion like
*.{flac,mp3}don’t work – use separate lines instead
Technical Details
- The
.ndignoresyntax utilizes the go-gitignore library. See documentation for additional syntax usage.
Folders with a .nomedia file
Kodi and Android use a .nomedia file to keep a folder out of media scans. If your library already uses these
files, set the Scanner.RespectNoMedia option to true.
Navidrome then skips each folder that contains a .nomedia file, and all its subfolders. This works like a blank
.ndignore file. Navidrome does not read the contents of a .nomedia file.
Scanner.RespectNoMedia = true
This option is off by default. Some Android users put a .nomedia file in their music folders only to hide the cover
art from gallery apps. With this option on, Navidrome would not show that music.
After you add or remove a .nomedia file, start a scan manually.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can make this documentation even better.
Sorry to hear that. Please tell us how we can improve this documentation.