Duplicate imports after upgrade

Hi,

I just updated to the latest version of OSMC with Kodi 21.1 (Omega)
Everything looked fine until I tried to refresh the library.

it appears it is now treating all the trailer files I have in the same folder as a movie, so I have ended up with duplicate entries of movies. One being the actual movie, and another being the trailer.

The trailers have the same file name as the movie expect for “-trailer” added to the end.
I use locally stored XML files only.

Any idea what’s going on?

Hard to tell without a set of logs.

It looks like I made an oversight when I submitted a fix to exclude some files that Synology NAS’s were making. I’m so very sorry for this. I’m really surprised that it didn’t pop up with anyone running the test builds. I’ve now submitted a fix for this issue but to resolve your issue right now I suggest the following. First to keep it from happening again please ssh into your box and run the following…

nano ~/.kodi/userdata/advancedsettings.xml

and copy the following and paste it into that file…

<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings version="1.0">
    <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>
</advancedsettings>

If you have an existing advancedsettings.xml file exclude the first two, and last tag, and just copy the rest of that block into your existing text. You will only need to keep this file/text until the next update as it should be pushed out to general post-haste.

Now, as for dealing with your duplicates, assuming you have more than a couple, and manually deleting them does not sound like a good time, I suggest to remove the updated library so it can grab the one from v20 and update it again. To do so you would run the following at the terminal…

systemctl stop mediacenter
cd ~/.kodi/userdata/Database
ls MyVideos121.db && rm MyVideos131.db
systemctl start mediacenter

This will delete the Kodi v21 databases as long as the Kodi v20 database is still present, and then start Kodi back up to get it to convert your old database again.

1 Like

Thank you so much for your response.
I will attempt this fix tonight after the kids have gone to bed, it’s morning here in Australia.

Your instructions seems straight forward (I already have an advancedsettings.xml file)

Is there any chance that the v20 DB is not present? In my infinite stupidity I didn’t make a backup of anything before the update.

1 Like

We’ve now pushed that first part so in a couple hours you should be able to update again and that should take care of the advancedsettings.xml part. You’d still want to do the second bit with shutting down Kodi and removing the v21 database. There is a 99.99% chance your Kodi 20 database is still there as that is stock behavior. I just prefer to post a failsafe solution with caution in case someone else reads this down the line and wants to give it a go with some other situation like a clean v21 install that would never had seen a previous database file.

Thank you again, I will hold off until that updates becomes available, saves me from “cluttering” up the advancedsettings file :slight_smile:

1 Like

Just deployed the fix that you released. Everything is now working perfectly.
Thank you so much for the quick turn-around. You guys rock!

2 Likes

Brilliant, glad to hear. Thanks for getting back to us.