Database/SQL question, move everything in source A to source B.
#1
Hi,
I have two video sources; /media/documentaries (sourceA), /media/movies-docu (sourceB). I want to move the contents of sourceA in sourceB, and update the video library with as little hassle as possible. Can I simply delete the "path" table entry where strPath = sourceA, then do a strPath REPLACE sourceA -> sourceB everywhere sourceA appears in strPath in all tables? AFAICT, no tables reference the idPath of source entries in the "path" table. Is this correct?

I'm fine editing the database directly, do it frequently, and yes I make backups. I don't want to bother with the hassle of exporting nfo files and all that entails, just for this. I'd like to make sure I'm not missing something though.

Thanks
Reply
#2
Deleting entries from the path table is not a good idea. The files table for one uses the idPath.
Replacing the text in existing path records might work. This might invalidate the hash for quick library update but would be a lesser problem, taken care of with a first library update that's longer than usual.
The path string is also present in some table columns, ex. movies.c22

if you find a way that works it would be nice to share your sql statements as there are likely more people interested in such a move.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
qualified with *in the past

the best way was to create a multi-path source from a single path source

kodi has existing source A with path A, you want to move content to path B which kodi does not know anything about

add path B to source A, move content from path A to path B, refresh in kodi

this used to retain information about a specific movie but just update it's path, because the same file exists within the same source

-----

have not used kodi to maintain metadata in quite some time so that is why i have qualified all this with "Used To" and "In The Past"
give it a try with a single movie and if it works great, if not nothing lost
Reply
#4
If you have local art for library items or actors, the path is stored in the art table.  I think Kodi will find the new art location if you do refresh n the item, but I don't think the old paths ever get cleaned out.

I recently did this for movies in MyVideos131 (Kodi 21) by updating the strPath in path and c22 in movies (and physically updating the file system path).   Don't have versions so didn't look into that.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Database/SQL question, move everything in source A to source B.0