Strange situation with "ghost" Movies

Dear friends,
had to change my network (router etc) and not only the Vero but also my NFS file server have changed address.

After trying a lot of things now I am in the current unsolvable situation. In the Movies menu I see “old” 140 movies and when I look at the info (under refresh) I see that they all have the old nfs://192.168.1.74/path PATH and I can only delete them one at the time.

In the Videos menu I have deleted all sources and asked to clean the database but those entries are still there.

a) How do I delete the 140 wrong entries not one by one?
b) After cleaning I guess it will be enough to go to Files and re-add the new file server NFS export, right?

Thanks a lot and please all keep safe from this damn virus :frowning:

PS In my OSMC (March 2020) there’s no OSMC Skin, Main → Settings → Media → Library → Clean Library Clean Library entry does not exist.

Make sure your settings level is set to Expert.

Hi there Sam,
the settings are on Expert.
Take care.

Please post debug logs so we can see why it doesn’t clean up.

My bad Sam, the setting wasn’t on Expert. Changed it, and its cleaning the database. Will update when it ends. Thanks a lot and ciao from Rome holed up at home for 3 weeks now :frowning:

Glad this is now solved, take care.

Database cleaning ran overnight but the Movies entry are still there unfortunately. Will read about how to upload debug logs and post as soon as a second attempt at cleaning the DB finishes. Thank you very much.

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

@fzinken how are you? as usual thanks for trying to help.
This “Cleaning database” is taking HOURS :frowning: Yesterday I left it running overnight. Now it’s almost one hour and it’s roughly at 20%.
I am tempted to interrupt and reset OSMC to scratch (is there an HOWTO). Advice?

Well to just reset Kodi

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bak
systemctl start mediacenter

If needed you can restore:

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bk2
mv ~/kodi.bak ~/.kodi
systemctl start mediacenter

If your original setup was restored as expected and you want get rid of the unneeded clean install you can delete that with the following command.

rm -r ~/kodi.bk2

For a full reinstall

1 Like

This is a Kodi issue rather than OSMC.

I’ve had exactly the same issue. The cleanup script is a bit pants. I had the same issue with Kodi on a FireTV stick. There is a plugin that writes to the actual database but I’m loathed to try it.

Turns out when you have a huge library the quickest way is to reinstall OSMC/Kodi :frowning:

If you have a search on Google you’ll find this is an issue, although I mean how difficult is it to fix seeing as they give you the option to change the IP address of each share on NFS for them to update the relevant entries for each movie/tv series etc?

Just the first three commands have solved the problem. Thanks a lot.
Just had to reconfigure Video and Audio options.
Now need to verify the subtitles addon and how I had obtained the last movies as default on the movies page (as opposed to the current random pick).

Can I get rid kodi.bak directory now?

Thank you very much.

Yes unless you feel you want to reuse any config or library from there.

Thank you very much.

There is not an issue with Kodi in this regard. There is an issue with people misunderstanding how it works. People often think the source information has something to do with their database and it does not. The sources are used by the scraper. Once a media item is scanned it is stored in the database as an absolute path. If this absolute path changes then Kodi has a way to fix this without messing with your library. As for the cleanup script it simply looks to make sure the media is there and deletes the entries if they are not valid. In normal use this would only be someone deleting a movie or TV series out of their collection. I do this all the time and it not only works, but it normally runs in less than two minutes on my setup. If it takes forever it is probably because the network device it is checking is no longer there so it has to wait for the network to time out looking for that machine on every entry since there is not a computer there to send back a message that the file does not exist. I believe Kodi sends a message when this happens that you have to agree to for this to even start removing items from a non-existent machine. The quick and easy option here to clean the old source would be to remove the media source from Kodi without editing it and agree to delete all items from that source. Once the source has been edited that doesn’t work as it would be deleting media matching the updated source, not the original one with broken file paths.

2 Likes

I still find it a bit mad. The IP address which you are allowed to change is known and what you change it to is also known so why is this a manual thing at all?

I understand the clean is incredibly slow because it tries to check every item to see if it exists so as far as I understand it’s waiting for a response from a non existent share?

Dear Paul,
what you describe I’ve done a zillion times. The problem this time was that deleting the source AND asking to clean up its entries DID NOT delete them as it happened so many other times.
Even after deleting ALL sources from Videos those 148 persisted. None played and using the menu and getting info all were still pointing to a nfs://IPADDRESS/path that did not exist anymore. I could only select them one at the time and delete but given the number that would not have been viable. In any case resetting Kodi as fkzinken suggest cleared the mess and now I only need to reisntall a couple of plugins and remember how to indicate that when I download subtitles my first choice would be Italian and my second English. Take care and stay safe!!!

If you are having problems cleaning the library and would like to see a fix, then this is the wrong place to be talking about it. The Kodi forums are the correct place to discuss issues like this.

2 Likes

Did you at some point have some library entries scanned using a hostname instead of an IP? Did you actually check one of these 140 “wrong” entries that didn’t get cleaned up to see if they didn’t actually work?

Once you understand this is a Kodi issue your advice does make sense, but only then. My day job is being a medical doctor and it’s like I told you that you decide which specialist to visit. Not wise :wink: