Can I prevent certain files from being scanned?

OSMC is an operating system that runs Kodi as its primary interface. This forum is primary support for hardware and things related to the underlying operating system or OSMC customizations of Kodi. It is kinda like if you bought a Samsung tablet you would primarily look for support for Android from Google or sites specific to Android in general. On this site we frequently attempt to help with Kodi questions generally, but the best place to seek answers to Kodi specific questions, is Kodi themselves. The issue you have I’m sure would be the same regardless of what hardware you were running Kodi on.

If you would like to attempt support for this issue from the community here feel free to start a new thread for your specific issue. When unrelated topics get put on threads such as this it makes it more difficult for others seeking topical support to wade through all the information. I’d suggest again though, that the people closest to your issue, and the ones most likely to have the most knowledge about this new feature, are the folks over on Kodi’s forum.

Ah, ok, thanks. That makes it clearer.

1 Like

And the samples are back. I just don’t understand this.

I somehow managed to find the advancedsettings.xml file (damn Linux), and it seems like the relevant text is already there:

 <advancedsettings version="1.0">
   <video>
      <excludefromscan>
          <regexp>[-\._ ](extrafanart|sample|trailer|extrathumbs)[-\._ ]</regexp>
      </excludefromscan>
      <excludefromlisting>
          <regexp>[-._ \\/](extrafanart|sample|trailer|extrathumbs)[-._ \\/]</regexp>
      </excludefromlisting>
      <!-- Extras: Section Start -->
      <excludefromscan action="append">
          <regexp>/extras/</regexp>
          <regexp>[\\/]extras[\\/]</regexp>
      </excludefromscan>
      <excludetvshowsfromscan action="append">
          <regexp>/extras/</regexp>
          <regexp>[\\/]extras[\\/]</regexp>
      </excludetvshowsfromscan>
      <!-- Extras: Section End -->
   </video>
 </advancedsettings>

So what’s going on?
I guess I won’t get any support here because Vero 4K+ is EoL by now anyway.

There is no relation between the software upgrades stopping and support here.
If you use the appropriate way to ask for support you will get support on this forum forever.
For your current problem give us the filename of a Video wrongly shown in the Library and also share your Debug log here.

Is your file named with “sample” having any upper case letters in it? If so you need to have your regex account for that…

      <excludefromscan action="append">
            <regexp>(?i)[-\._ ](extrafanart|sample|trailer|extrathumbs)[-\._ ]</regexp>
      </excludefromscan>

I will try that.
But how should the entire file look like? Or do I just add what you posted at the end? Or what is the difference between <excludefromscan> and <excludefromscan action="append"> ?

The forum doesn’t even let me post the stuff in brackets. I give up.
Oh It requires the code tag.

I believe that if you only do the “exclude…” part it replaces any system level ones that already exist, and adding the “append” bit tells it to include what your specifying in addition to.

Just like it does currently except you may want to add the “append” part to the first couple exclusion tags that don’t have it and add (?i) to any of your regex lines that you want to be case insensitive.

1 Like

I think it can vary, and sometimes there are even folders called sample.
I did a search, this came up:

There is system level exclusion list too? This is getting complicated.

As per Kodi’s advancedsettings.xml wiki there are built in exclusions for a few things. For example, by default it has…

<video>
  <excludefromscan>
    <regexp>-trailer</regexp>
    <regexp>[!-._ \\/]sample[-._ \\/]</regexp>
  </excludefromscan>
</video>

which would be active if you had the action="append" part added in your tag. The translation of that regex I believe to be matching a period, dash, underscore, parenthesis, space, or Windows or Linux file path divider, followed by a lower case “sample”, followed by a dash, period, underscore, space, or file path divider. There is also a second rule to exclude any file or folder that has a lower case “-trailer” in it.

There is also exclusions that OSMC has added to the system for excluding a few system files…

<video>
<excludefromscan action="append">
<regexp>(?i)(@eadir|system.volume.information|\$recycle)</regexp>
</excludefromscan>
<excludetvshowsfromscan action="append">
<regexp>(?i)(@eadir|system.volume.information|\$recycle)</regexp>
</excludetvshowsfromscan>
<excludefromlisting action="append">
<regexp>(?i)(@eadir|system.volume.information|\$recycle)</regexp>
</excludefromlisting>
</video>
<audio>
<excludefromscan action="append">
<regexp>(?i)(@eadir|system.volume.information|\$recycle)</regexp>
</excludefromscan>
<excludefromlisting action="append">
<regexp>(?i)(@eadir|system.volume.information|\$recycle)</regexp>
</excludefromlisting>
</audio>

That looks like the problem is that you have files other than just lower case and your regex isn’t written to capture them. You could rename your files or tweak your exclusions. Either way should work.

2 Likes