I have noticed there were bunch of sample.mkv files polluting the movie library. Unfortunately I can’t get rid of them since it would mess up the torrents on the seedbox.
Is there any way to make OSMC ignore certain files from being scanned in?
Hi, perhaps you haven’t found this while your search here: Issues with filenames that include the word 'Sample'
There could be another reason why the samples re-appeared.
By default sample is ignored in Kodi but in the first osmc update of August, the keyword “append” was forgotten in the excludefromscan tag in the video section of the default advancedsettings.xml.
That was corrected in a next update with the same osmc version.
Perhaps the OP does manual updates and has that first version still running and he then subsequently only needs to trigger a new update to get rid of the samples in his listings.
Re-appeared? I don’t know. But thinking about it, I never saw samples in the library before.
And yes I do manual updates, because I never figured out how to make the damn Vero 4k update automatically.
I am on version 2024-08.01 or something, and manual check says there are no updates available.
I rebooted the device and there is a whole bunch of Samples in the library. I don’t know what to do.
Can you try to manually trigger another osmc update?
The last patched version should ignore samples.
I just did! What’s the point of checking for updates twice?
I actually downloaded an update about a week ago, and it was weird, because the version didn’t change, and I couldn’t find any changelog anywhere. Normally I get them in the email via a RSS.
I use this forum to keep up-to-date with the changes (release, patch and upcoming).
On top there is always someone here to give immediate feedback/support if needed.
Since you updated to the very last version, you could do a clean & rescan of your video libraries. I assume that the samples will be removed again from the db.
I did do the cleanup, reboot, then the library automatically updated, and all the samples are still there.
Perhaps it’s advancedsettings.xml that is overwritten?
No. I googled that up, but I don’t even understand what the hell regular expressions are, so I ditched the idea (that was before I posted here).
I manually removed all the samples from the library, did a cleanup, update, reboot, update, cleanup, blabla, you get the idea, and they didn’t reappear, so I’m thinking there is no feature in the system that hides them.
There were only six of them in the library so it wasn’t terribly annoying, but I don’t know what would I do if I had tens of those in there. The remote is certainly pain in the ass.
I understand those regex’s are a pain in the ass.
But if those samples would come back one day, you could try to create you own advancedsettings.xml with the video settings that should be applied by default but in your case are not.
To help you out, I created the XML content for you.
Have a nice day and glad to hear that everything sorted out.
<advancedsettings version="1.0">
<video>
<excludefromscan action="append">
<regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</excludefromscan>
<excludetvshowsfromscan action="append">
<regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</excludetvshowsfromscan>
<excludefromlisting action="append">
<regexp>[-\._ ](sample|trailer)[-\._ ]</regexp>
</excludefromlisting>
</video>
</advancedsettings>
nb. This file needs to be placed in the Kodi Data Folder.
Thanks.
Most of the samples are usually called sample.mkv, but sometimes/occasionally they are called “ - sample.mkv” (with or without the dash).
Will the above work in these cases too?
Yes.
It will ignore all filenames with the text ‘sample’ or ‘trailer’ in it.
Those are already built into Kodi so that wouldn’t be needed. I omitted adding the “append” to our new exclusions which overwrote the built-in exclusions. This was identified, rectified, and an update pushed within a couple days of the initial 21.1 release, and before a full image was built and released to the public. As such, it shouldn’t be possible for anyone to actually obtain a copy of OSMC with this bug at this point, and the affected users should be contained to people who ran the test builds for this release or installed within a couple days of the initial public release. If there is anyone affected still that is looking for a solution I posted instructions in the following thread on how to remove the Kodi v21 library so it reimports the v20 library without the extra files which would be a lot faster than starting from scratch.