Trying to exclude non music folder
Using Kodi build 17.4 Compiled Aug 22 2017

Under Media Settings > Library > Music.... > Music on 4 (long press) doesn't seem to have a "Set Content" or "Change Content" option to be able to "Exclude selected folders from scans" like Video.

Following the instructions I found

7 Excluding directories/folders

Kodi can exclude certain directories from the library all together using a few different methods.
Use the "Exclude folder from scans" option when the content type is set to "none"
Place a file (even an empty one) named .nomedia in the directory you want to exclude.
Note: Windows users should name the file .nomedia. which will trick Windows into using the proper .nomedia name.
Folders with -trailer or sample in the name will be automatically skipped. For the exact pattern match, see here.
Users can also add additional patterns to be excluded by using the advancedsettings.xml tag <excludefromscan>

I can't exclude the folders under the first option, I tried putting .nomedia and .nomedia. in the folder I want to exclude and that didn't work either (unless it did ignore it and I need the file in the thousands of sub folders) and finally I tried making the advancedsettings.xml file and placing it in ..../kodi/userdata folder.

I am not 100% sure how to use this file and put this text into the file.


<!-- Amount of headroom Kodi should use above the maximum volume level, in decibels. Defaults to 0, valid values 0, 6, 12. -->
<!-- Default audio player: paplayer or dvdplayer -->
<!-- Regular expressions that if evaluated to true won't be added to library. -->
<regexp>[-\._ ](smb://WAREHOUSE/Volume_4/ZZ. Not Music/*.*)[-\._ ]</regexp>
<!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
<regexp>[-\._ ](smb://WAREHOUSE/Volume_4/ZZ. Not Music/*.*)[-\._ ]</regexp>
<!-- Amount of gain (dB) to be applied to AC3 streams that have been mixed-down to 2 channels. Default is 12.0. Valid values are: -96.0 to 96.0. -->
<!-- Minimum percentage that has to be played before it is considered for incrementing in the Top 100 database view, or for submittal -->
<!-- Whether to use Dynamic Range Compression (DRC) on AC3 streams. 1.0 is "full" compression, as defined by the audio track's metadata, which is recommended for "basic" sound systems such as the internal speakers on a TV. 0.0 is no compression at all, which is recommended for people with nice multi-speaker sound systems. -1.0 (default) defaults to whatever ffmpeg uses, which is currently the same as 1.0. This has no effect if passthrough is enabled for AC3. -->
<!-- default values for limiter/compressor -->
<!-- default values for limiter/compressor -->


Can someone please tell me if I got this bit right "smb://WAREHOUSE/Volume_4/ZZ. Not Music/*.*" because it still continues to try scan that folder and subfolders.
With music you can't exclude a subfolder if you ask to scan to library on a parent folder, the only way to do this is scanning the subfolders individually and skipping the folder you don't want included. Not sure the .nomedia works at all within music but if it does then I would suspect it would only prevent scraping metadata from the internet data sources.
Ok thanks for that. I use that drive for backup of PC files from the last 20 years so I have who knows what in that other folder, the rest is music so it sounds like I need to make a "Music" folder and have two root folders and scan just Music.

Does anyone have an example advancedsettings.xml file so I can see what it is meant to look like? I'm not even sure I copied the right info into it.
What @jjd_uk said was correct.

Yes do make a music folder, or even several to cover different kinds of music, and add than as music sources and say yes to "scan to library?"

You don't need to have any music settings in advancedsettings.xml, it works reasonably without by default. The music library is based on metadata embedded in the music files not on parsing file names etc. so just point Kodi at some tagged music files and it does the rest.
Ok thanks I was more interested in learning how the xml file format works so if I need to mod anything else down the track I would know how.
You can have:

Music - Library folder
Music - Backups folder

then either:

1. Add Music as Source and say no when asked to scan to library. In File view go to Library folder open Context menu and select scan to library so only that Library folder gets added. Doing it this way means you have file view access to the files in Backups.

2. Add Music - Library as Source is access to Backups is not required.

Music - Some artist folder - Some album folder
Music - Some artist folder - Some album backup folder

Add Music as Source again saying no to scan to library then scan from context on "Some album folder" and skip "Some album backup folder".

Logout Mark Read Team Forum Stats Members Help
Trying to exclude non music folder0
This forum uses Lukasz Tkacz MyBB addons.