Updating Library Outside Of OSMC

Is there some type of application that will (run on Windows Server) allow me to update the media library so I don’t need my media clients to do it?

I currently run mySql on a Windows Server box. All of my media clients (Pi3/OSMC and Windows/Kodi) that are slowing being converted to OSMC on Raspberry Pis connect to a shared media library. I would like to update that library without having to wait on my clients to do it. I was hoping that I did not have to run a dedicated box to run kodi all the time just to use scripts etc inside the kodi interface to keep updating the library.

How do people do this these days?


There are a couple addons in the official Kodi repository which will do this:

Library Auto Update (in the Program addons section). Can be set to run on whatever schedule you like. Also allows for scheduled Library cleaning.

Watchdog (in the Services addon section). This just runs all the time and scans any new item it finds into the library within very short time of the new item being added a source folder.

Both obviously require Kodi to be running. The Library Auto update, though, could be scheduled for when you’re unlikely to be using that machine.

Since you have a Windows server you could install Kodi there just to do the updates, perhaps even in virtual machine.

Otherwise I’m sure there are some media managers that can update a Kodi shared database, but I can’t personally advise on any as Ive never used them


I use texturecache.py to do the job. From from my laptop I run:

 texturecache.py vscan @kodi.host=yeti.local

to update my library, and I can do that while watching a movie on the client that is running the update.

I thought that was just for fixing images. I was about to start trying to use that too. So that will work out perfectly!


A couple of hints, I for get the exact setting, but you can turn off the update progress in the GUI, so the scan will happen with no on-screen feedback. A must for me if using while watching a movie.

You can also scan multiple profiles if you use them:

texturecache.py vscan @kodi.host=azal.local @profile.name=Ernie

And if you need to clean (removed/renamed files):

texturecache.py vclean @kodi.host=azal.local @profile.name=Ernie

My plans are to use this sweet script to run on my server, not on any of my actual clients. That way the library is only being updated one place and by a server that can churn all day long with no performance hits to anything.

On my server I have never installed Kodi though, I’m guessing I have to do that to use this script right? Or is that even needed? All of my shared settings etc are hosted on the server for all the clients to pull from.

I have just installed Python 3.7.0 for windows and have the texturecache.py script on my server. I was just about to create me a cfg file (texturecache.cfg) using the following example…

userdata = C:\Users\XXXX\AppData\Roaming\Kodi\userdata
webserver.username = XXXX
webserver.password = XXXX
allow.recacheall = yes

I’m confused as to what the path for the userdata would be if I don’t install Kodi though. Any hints?

You could install Kodi on the server, but the best way would be to just run the script on the server using the @kodi.host to select a client to run the update on. That’s how I do it.

So from what I can tell texturecache.py is nothing more then command line options for Kodi itself. In other words, if I have Kodi closed on the machine and try to run texturecache.py it will not do anything (due to the webserver of Kodi not running).

So there is no way to manage the Kodi database itself without using Kodi in someway correct?

You are correct, Kodi must be running on one system. I know of no utility that can update the database without Kodi running.

As I said, you can turn off the scan progress notification, so you can run the scan on a client and never notice that it’s running.

More specific support for Kodi itself can be found on the Kodi forum. Might be worth asking there.