Kodi Community Forum

Full Version: advancedsettings.xml - .dat and 'sample' 'trailer'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm trying to exclude .dat files and video files with 'sample' or 'trailer' in the title.

I had .dat working but sample/trailer isn't working at all.


xml:
<advancedsettings>
   <videoextensions>
        <remove>.dat</remove>
   </videoextensions>
<video>
<excludefromscan>
<regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</excludefromscan>
<excludefromlisting>
<regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</excludefromlisting>
</video>
</advancedsettings>


Any code correction would be appreciated.
(2020-04-01, 23:51)Paft Wrote: [ -> ]Any code correction would be appreciated.
Code:
<excludefromscan>
        <regexp>[-\._ ](extrafanart|trailer|extrathumbs)[-\._ ]</regexp>
</excludefromscan>
<excludefromlisting><!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
       <regexp>[-._ \\/](extrafanart|trailer|extrathumbs)[-._ \\/]</regexp>
</excludefromlisting>

Works for me, just add or change the words to match your exclusion.
Thank you.

Could you please show me how you'd  .dat  and 'sample' 'trailer' because I cannot get it working together.

Edit: In the meantime I've just used everything.exe and deleted any video file with 'sample' 'trailer' in the title and used:

xml:
<advancedsettings>
  <video>
    <excludefromscan action="append">
      <regexp>(~uTorrentPartFile)</regexp>
    </excludefromscan>
    <excludefromlisting action="append">
      <regexp>(~uTorrentPartFile)</regexp>
    </excludefromlisting>
  </video>
</advancedsettings>
(2020-04-01, 23:51)Paft Wrote: [ -> ]I had .dat working
Thought you had .dat working. Any trailers within the movie folder must be named "any movie name-trailer.ext" without the quotes. Key here is the -trailer appended to the name. If the trailers have already been scraped as videos into your library, you must delete the listing manually or clear the library and re-fresh. Using and exclusion or extras folder would allow you to hide just about anything. New features for multiple videos are on the horizon.
Could you kindly paste an example because I am just not getting it. Samples and dat files are still coming through.

I only had dat working when it was like this:

xml:
<advancedsettings>
<videoextensions>
<remove>.dat</remove>
</videoextensions>
<video>
</advancedsettings>

This doesn't  work:
xml:
<advancedsettings>
  <video>
<excludefromscan>
        <regexp>[-\._ ](sample|Sample|Trailer|trailer|Preview|preview|dat|~uTorrentPartFile)[-\._ ]</regexp>
</excludefromscan>
<excludefromlisting><!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
       <regexp>[-._ \\/](|sample|Sample|Trailer|trailer|Preview|preview|dat|~uTorrentPartFile)[-._ \\/]</regexp>
</excludefromlisting>
  </video>
</advancedsettings>


edit: If you don't hear from me again I think this works.:
xml:
<advancedsettings>
  <video>
    <excludefromscan action="append">
      <regexp>(trailer|sample|Sample|Trailer|trailer|Preview|preview|dat|~uTorrentPartFile)</regexp>
    </excludefromscan>
    <excludefromlisting action="append">
      <regexp>(trailer|sample|Sample|Trailer|trailer|Preview|preview|dat|~uTorrentPartFile)</regexp>
    </excludefromlisting>
  </video>
</advancedsettings>
Glad that solution works for you, I would suggest that a movie folder should only contain the movie & met-data supported by Kodi, that;s what the Add-on:Extras (wiki) folder is for OR an  exclusion folder. In your .xml the  local trailer will not be played from the Kodi interface, Kodi will be looking for the key '-trailer' designation.