Hi.
I know, kodi related. But somehow I get no answer over at the kodi forum.
So - if someone here has mastered the art of regular expressions (maybe summer school at Hogwarts), I’d be thankful for your help.
Within <pictureexcludes>
,
I’d like to exclude all folders within my pictures folder containing “blog” in the folder name, as well as all pictures containing “blog” in their name.
What would be the regex for that?
Here’s a good tutorial about regex. http://www.rexegg.com/
You could try:
<advancedsettings>
<pictureexcludes>
<regexp>.*blog.*</regexp>
</pictureexcludes>
</advancedsettings>
which is a little inefficient. You could also try:
<regexp>.*?blog.*?</regexp>
which should be more efficient but might not work with Kodi.
I had figured out this for myself but it looks wrong…
#\/^blog.*/
And do I need to specify the root folder?
It’s wrong if it doesn’t work.
I assume it will only apply to the location (or locations) where you’ve told Kodi to look for photos.
Haha, right you are!
But, with 40000 pictures it might take some time to realize that it’s not working…
I was hoping for a quicker solution.
osmc_fan:
But, with 40000 pictures it might take some time to realize that it’s not working…
I was hoping for a quicker solution.
Copy a few hundred photos to a test location and temporarily modify Kodi only to look there.
Thinking about it afterwards, this might work:
<regexp>blog</regexp>
ie just the word blog. It all depends on how Kodi processes its regular expressions.
For example, a simple grep:
osmc@osmc:~$ echo abcblog123 | grep blog
abcblog123
will find the string blog without the need for any special characters but I don’t know how Kodi works internally. You’ll need to experiment a bit.