How to exclude picture folders on NAS from screensaver with regex

Hi there.

I am running the latest OSMC on an RP2.
I’m using the screen saver to play pictures located on my Synology NAS.
How can I exclude certain folders from being used by the screen saver?
I’ve already created an advancedsettings.xml with the following content as suggested in the forum (I got no response there) :

regexp 2017-10-15 Birthday | 2016-05-12 Game /regexp

→ I removed the brackets because it seemed to not display properly…

This does not do the job.

From my beginners understanding of regex there seems to be missing these cryptic regex expressions? Also the might be a problem with all the spaces in the folder names?

I hope somebody here can help me with this problem.


The Kodi documentation here contains an example with two regular expressions, so it looks like you should be able to use:

  <regexp>2017-10-15 Birthday</regexp>
  <regexp>2016-05-12 Game</regexp>

So it matches for the name of the folder (inside the defined source) including the spaces?
None of these ". /. *] stuff?

But ok, I’ll try putting the folders in separate lines, maybe that will do the trick.

Please use code tags.
I am just a OSMC beginner, but REs should be used to match against commonalities. If you have to match only a couple of directory names, REs are overkill. If, OTOH, you have to match some names that have all the same structure like, for instance, [name].[date].[type].[ext] and you want -say- to match all dates between two dates, that’s something REs are very good at. Anyway, as I said I am by no means a OSMC expert, so I don’t know to what extent REs are supported by Kodi/OSMC.

Thanks for your reply.
I tried code tags, but it looked weird. But maybe it was just my phone displaying it weird.
Well, if REs are overkill for my purpose - how do I exclude folders?
Over at the kodi forum it was said the .nomedia way does not work (and I don’t know what that option would do to the picture scanning of the synology photo station?).
I am open to try other ideas.

Did you try my suggestion? (BTW, Discourse uses the Markdown markup language. Here’s a useful cheatsheet I found. You can also highlight the text and use the </> (preformatted text) button to markup a block of code.)

AFAICT, if you want to exclude picture files or folders, you need to use <pictureexcludes>. That, in turn, requires the use of <regexp>something</regexp>.

In this case, the regular expressions will be the literals 2017-10-15 Birthday and 2016-05-12 Game, just as a or cat can be valid regular expressions.

I did. No joy.

Try with just the date portion - and make sure that there are no spaces either side.

Yep, it works (~osmc/.kodi/userdata/advancedsettings.xml):

        <regexp>2016-05-12 Game|2017-10-15 Birthday</regexp>

With spaces. Thanks.

So it works with that | between the folder names? Did you use spaces before and after the |? I did - maybe that’s the problem?

Just as posted, no spaces on either side of the pipe (vertical bar). The spaces in the directory names are not a problem. The way I tested is: create the file, reboot the RPi, navigate to Pictures. On my HDD I created 5 directories: Dir1, Dir2, Dir3 and yours two, each with a picture inside. Only Dir[1-3] show up.

I’ll try this when I’m back home and give you guys feedback.