optimal way to move a source folder
#1
I need to move my source folders to improve file management. So the question is what is the best way/order to do this so Kodi doesn't have to download the metadata again. I prefer not to export the metadata if it's not necessary.

Is this the correct way to do this? In this order:
Outside of Kodi...
(1) Perform the actual move of the source folder(s)
Inside Kodi:
(2) Add the new folder location(s) as a new source and have it scan for new content (at this point movies/TV shows will show 2 entries) I'm hoping it doesn't have to download metadata since it should still be present.
(3) Remove the old/defunct source(s)
(4) Perform "Clean library" to remove the extra entry for each movie/TV show.

I have a very large library so I don't want it to waste time or net bandwidth downloading metadata it should already have.

Will the steps I listed avoid the metadata from being disassociated and requiring download again?
Also does this keep the watched/unwatched status intack?
Reply
#2
In short, for Kodi:
- Export the video library via separate nfo files and graphics. Don't forget to activate the watched states and resume points.
- Delete / rename the current video library.
- Delete the Textures13.db file and the Thumbnail cache. (there are both based on the old source paths)

- Restart Kodi for a new video library.
- Add your new video source(s) in Kodi
- Set the content setting(s) and start the import.

Do you use a centralized SQL database, or a single Kodi device with all databases on this client?
Reply
#3
There is a multitude of different ways to handle migration: Check this HOW-TO:Backup the video library (wiki) and note the advanced settings to maintain watched lstate.

(keep in mind the date of this thread) https://forum.kodi.tv/showthread.php?tid=90619

"I prefer not to export the metadata if it's not necessary." And there'in is the rub. I can respect this but with a larger collection, the export will allow migration of source folder easily. Kodi on a scrape (you can set for local information only or utilize your scraper choice) will check the local movie folder for meta-data, then use it without a web access, making the scrape very quickly. If meta-data is not found with the movie, then a web scrape will default, which for large libraires will amount to bandwidth handshaking (large time). The added benieft of the local scrape is that any changes (edits or 3rd party media managers) in the meta-data will be picked up.

At the end of this proceedure you could set-up a batch file to delete the meta-data in the folders as it's only in use as back-up, but I would encourage users with large libraries to maintain this method of library managemnt.

(1) Obviously move the selected folders to the new source.

(2) You can edit the source file to point to the new location, Kodi will delete the exisiting meta-data and start rebuilding with the scrapers. Otherwise creating a new source will result in duplication of files that will hang around. (3) until you have eliminated the source of dups, and (4) proceed with a system clean, a little less simple, but just as effective.

I've personally have around 40 source folders, and I'm always moving the sources to fit various drives and mainpualting the library meta-data and find this method is effective and optimal for my needs. An alternative some use effectively is to load up the library meta-data in notepad++ and use search and replace to edit the paths, while manually editing the sources .xml file but I've found large libraries a bit of a pain to deal with in an editor.

Then there is the information provided in the wiki and as Klojum suggests, which I overlooked favouring my own method.
Reply
#4
(2018-09-04, 18:35)PatK Wrote: An alternative some use effectively is to load up the library meta-data in notepad++ and use search and replace to edit the paths, while manually editing the sources .xml file but I've found large libraries a bit of a pain to deeal with in an editor.
Thanks for the replies. Sounds like if I don't export the metadata then Kodi will scrape the moved folder.

I forgot about editing with notepad++. I've done that in the past. Hmm. I could write some code to automate this for myself should I chose that approach.

As far as exporting to the source folder I'm apprehensive of the clutter it would create. I can fully appreciate the appeal to export beside the movie/TV show files as it keeps metadata with it to become portable. I'm struggling with the number of extra files it would create.

It would be a nice feature if you could export the info for a single item like a movie or an episode, perhaps a specific series, or one source without having to export the entire library.

Sometimes I need to edit the info for a single item. If kodi could export just that one then I could edit the .nfo to fix something, then reload it. But that's getting off my original topic. Could be added to the context menu for an item.
Reply
#5
"As far as exporting to the source folder I'm apprehensive of the clutter it would create." Without 'extras' the base file export would be movie.nfo movie-poster and movie-fanart. You could write a batch file (hey everyone could use it!) that would delete extranious files after you've manipulated your sources. Note, that export function allows for the exclusion of artwork. But I suspect you'll stick with this flexible method and give the scraper database some relief.

"It would be a nice feature if you could export the info for a single item like a movie or an episode, perhaps a specific series, or one source without having to export the entire library." In some fashion it's possible to leave out sources e.g. I have external drives not plugged in, they don't get an export, but they're still in the library. A system clean warns of drive sources off-line. With the meta-data in the movie folder, editing just one is easy, then a simple local refresh pulls the edit back into the library. I'll often take an entire folder/source and run it through TMM (timymedia manager) clean it up, and it becomes a 2 minute rescan locally.

If you do write any code (Kodi related) please share.
Reply

Logout Mark Read Team Forum Stats Members Help
optimal way to move a source folder0