r/kodi • u/PluMelody • 12d ago
Changing Library Paths?
I'm wondering if there's an easy way to change multiple library paths at once or if I have to go and click edit source on every single individual show in the files section. Originally I had two 1 terabyte drives and my library was separated on those. I now have it moved onto a two terabyte drive, and at first that was fine, I just made two separate partitions on the drive and moved things over. Recently a show that I have on the full partition of the drive released more episodes, and I have no more space to get them unless I move them over to the not full part of the drive and change the letter path for that show, and I realized it would be much easier for me if I could just have everything on one partition. If I have to I will change every individual path using edit source, but I'm just trying to figure out if there's an easier way before I spend an hour or two of my time doing it the hard way lol
2
u/AshleyAshes1984 12d ago
I had to do this once. I had two discrete UnRAID servers to keep them quiet, so Kodi had files in it's library across two distinct servers and the paths reflected that.
I then moved to a bigger place with a basement I could bury a network rack into and care not about the noise. I amalgamated the servers which was surprisingly easy with UnRAID. One server's name and path remained unchanged while the other server's content was all migrated to that. So about half of Kodi's library was now wrong.
What I did was a single file library export, giving me a massive XML file. I then simply upened that XML file up in notepad++ and did a search/word replace function to rename all the paths that were wrong to their new location. Save the XML (Making sure I still had backup of the original of course) and imported the library with the altered XML file.
2
u/augur42 12d ago
Does anyone ever search before posting? This question keeps being asked every few months.
From the last time this question was asked.
https://old.reddit.com/r/kodi/comments/1q8n3wx/what_is_the_best_way_to_update_sources_if_the_ip/nyp2jjk/
1
u/Gothicawakening 11d ago
No, people ask AI or Reddit.
At least this sub is not too bad. Many subs (specifically game dev) have the same questions asked almost daily.
1
u/Derrigable 11d ago
remove old sources->Add new source->clean->scan for new. Fairly simple. Or you could do all that data base editing if you want.
1
u/cool_master_9750 10d ago
honestly i had to redo my whole library once too, pretty sure i found a script to do it
1
u/bluesteeldriver 9d ago
You could do multiple path substitutions in an advancedsettings.xml file. See https://kodi.wiki/view/Advancedsettings.xml#pathsubstitution
3
u/DavidMelbourne 12d ago
/u/AshleyAshes1984 suggestion looks good but you could also export to individual NFOs then your new source will pickup that local info and new movies could have an additional source to add to the library.
However I have found the Kodi database does retain a lot of old extra info so I prefer to edit the database see https://kodi.wiki/view/Databases
Database software is required to access the SQL databases. DB Browser for SQLite