Archive for August, 2017

Kodi and problems when media source address changes

August 10, 2017

Maybe you have experienced something like that too. You have a network attached storage and  you connect it (for example via nfs) to your kodi system running on another machine (e.g. on a raspberry pi). You change something in your network configuration and – bam – nothing works. This could happen, because kodi gets it media data via a network address composed of IP addresses instead of a host name. If this happens to you – and it happened to me several times – this sucks. The first times I just created a new media source with the new IP address and imported all the media again. But wouldn’t i be nicer to just migrate the existing entries in kodi to their new location? This can be done relatively easy.

First: Use the /etc/hosts to define a hostname for the ip address of your NAS. Why? Because if there are new changes in your network configuration, you only need one change and everything is working again. Hint: If you are using librelec (like me), you need to set the hosts configuration in /storage/.config/hosts.conf .

Second: This doesn’t help you in the first place, if all your media entries are still linked to the old location. But there is a solution too: Kodi uses sqllite databases to manage its state. So you can use a sqllitebrowser like http://sqlitebrowser.org/ to change the wrong location of the media entries. Just follow the howto on the kodi wiki!

After this: Enjoy!

Advertisements