Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
I need some help with advancedsettings.xml
#1
I have a general questions, and also a specific issue that I'm having. First of all what is the difference between excludefromscan and excludefromlisting ? Wouldn't it make sense that if something was excluded from a scan that it would automatically not be able to be listed?

I have the following as part of my advancedsettings.xml file, and for some reason files named "sample" are still getting through.

Code:
<video>
      <excludefromscan>
         <regexp>[-\._ ](extrafanart|trailer|extrathumbs|sample|Sample|Introduction|Solutions)[-\._ ]</regexp>
     </excludefromscan>
     <excludefromlisting>
         <regexp>[-._ \\/](extrafanart|trailer|extrathumbs|sample|Sample|Introduction|Solutions)[-._ \\/]</regexp>
     </excludefromlisting>
Reply
#2
Please provide an example filename.

scott s.
.
Reply
#3
I'm trying to exclude sample.avi
Reply
#4
(2023-09-08, 02:15)SubNoodle Wrote: I'm trying to exclude sample.avi

your regex patterns are wrong then

the [-._ \\/] is not arbitrary, it is looking for dashes, dots, underscores, spaces

so you are excluding ".sample.", "-sample-","_sample_"," sample " where your file has none of those, if you renamed your file to .sample.avi it would hide it

this will work for "sample.*"

(.*?)(extrafanart|trailer|extrathumbs|sample|Sample|Introduction|Solutions)(\.[^.]+)


when you need to test regular expressions use https://regexr.com
Reply
#5
THANK YOU! This works and makes sense. I'm a bit green when it comes to regex, so I appreciate the link to regexr.com also.

Could you please explain when to use excludefromscan and when to use excludefromlisting?
Reply
#6
(2023-09-08, 02:58)jepsizofye Wrote:
(2023-09-08, 02:15)SubNoodle Wrote: I'm trying to exclude sample.avi

your regex patterns are wrong then

the [-._ \\/] is not arbitrary, it is looking for dashes, dots, underscores, spaces

so you are excluding ".sample.", "-sample-","_sample_"," sample " where your file has none of those, if you renamed your file to .sample.avi it would hide it

this will work for "sample.*"

(.*?)(extrafanart|trailer|extrathumbs|sample|Sample|Introduction|Solutions)(\.[^.]+)


when you need to test regular expressions use https://regexr.com

FWIW I like that tester as well, though I also use https://regex101.com/r/9y9n85/1

I admit I am being lazy at the moment and not testing (I don't use those regex exclusions myself) but excludefromscan should prevent an item from attempting to add to the library but still be visible in the media file listing (assuming extension is a whitelisted media file) . While excludefromlisting it won't even show up in file view (but I think it will in the file manager).

scott s.
.
Reply
#7
That makes sense. Following the first excludefromscan I have this (just from copying patterns I've found in documentation and the forum):

Code:
     <excludefromscan action="append">
         <regexp>/Extras/</regexp>
         <regexp>[\\/]Extras[\\/]</regexp>
     </excludefromscan>

What is the reason for both lines? And could I just add this to the first excludefromscan instead of having an individual line item for it?
Reply

Logout Mark Read Team Forum Stats Members Help
I need some help with advancedsettings.xml0