Kodi MySQL Server New NAS
#1
OK so I got a new NAS and I have moved all the videos over and have the folder shared.

My current setup is multiple Kodi boxes throughout the house where I edited the advanced settings.xml in order to share the library that is located on the old nas.
Connected the USB in the back of the old NAS (2 Bay Buffalo NAS) is a Raspberry Pi running MySQL.  It's been so dang long since I set this thing but that I can't remember exactly how this thing works.  I guess this is a testament to how reliable the setup has been.

So I was hoping that the MySQL server didn't have to see the the library that it only gets information from the kodi boxes connected to it.  Thought was I could simply remove the Movies folder from a kodi box then connect to the new NAS with a movies folder and the MySQL would simply be pointing there but I don't think that is correct.  I really don't want to set up the database again as I want to keep all the recents and watched movie information.

Any quick guide to moving to a new NAS?

Also when a box accesses the movie does the movie pass through the Raspberry Pi and then go to the kodi box or does it go directly from NAS to Kodi box?
Reply
#2
Simply moving video files to a different network/drive location will not make Kodi (auto)recognize the new location. Currently the full path of each video is stored in Kodi's video database. That probably can be done much more intelligent, but it is still the souvenir from the old days that we have to deal with.

There is a Kodi wiki page that contains a number of SQL queries which need to be executed manually so the paths can be updated in the video database. However, it is an outdated page, and it probably does not reflect the latest database changes in Kodi 17 and 18. It also does require some SQL knowledge and not everyone is comfortable in that area.

So for the time being, the simplest way to have your new Kodi library working, is to:
  • Make a backup of your current watched list and resume points via the Video Library Export function (using separate files recommended)
  • Delete/rename your current video database
  • Delete your local Textures13.db file as well as the Thumbnails cache folder, as their hashe names as based on the old video path(s). Otherwise you end up with double the cache folder size
  • Adjust the sources.xml file where necessary
  • Restart Kodi and import/rescrape your video collection.

This will also clean up your database of any old and long forgotten links. With the data being exported previously into nfo files, the import should go pretty smooth and quick.
Reply
#3
Thanks for the tip....I will first take a look at the SQL DB and see what possibly needs to change....potentially running some update queries and I can be done....if that doesn't work then I will try the suggestion you detailed out.  I used to write queries everyday at work for a few years so I should be able to figure out what needs changed.

Thanks for the help
Reply
#4
FYI, here is the current (outdated) wiki page: https://kodi.wiki/view/HOW-TO:Update_Paths_In_MySQL
I'm working on an updated and shorter version.
Reply
#5
BOOM!!!!

Thanks again
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi MySQL Server New NAS0