Kodi Community Forum
Edit video source location without losing DB entries? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Edit video source location without losing DB entries? (/showthread.php?tid=356428)



Edit video source location without losing DB entries? - allanp81 - 2020-08-13

I'm currently using a mysql server as my DB shared to multiple clients.

I want to move some of my content on my server but that means I will have to change the path to some of my sources on kodi.

My question is this: If I move the files and then change the source path, will Kodi think these are new files then time I do a library update or will it recognise that the files in the video source are the same? I want to maintain my watch history etc. and would hate for it thing all files are new!


RE: Edit video source location without losing DB entries? - Klojum - 2020-08-13

Kodi is still kinda rigid when it comes to sources. For every video or music file, the full path is stored.

In case you want to move videos (movies, tv shows, etc):

- Exit Kodi
- Activate the watched state and resume points settings in the advancedsettings.xml
- Start Kodi
- Video Library Export (using separate files)
- Exit Kodi
- Move the video folders to the new location(s)
- Start Kodi
- Video Clean Library
- Video Scrape Library

The .nfo files from the Library Export will make a subsequent scraping a lot faster.


RE: Edit video source location without losing DB entries? - allanp81 - 2020-08-14

(2020-08-13, 21:16)Klojum Wrote: Kodi is still kinda rigid when it comes to sources. For every video or music file, the full path is stored.

In case you want to move videos (movies, tv shows, etc):

- Exit Kodi
- @
- Start Kodi
- Video Library Export (using separate files)
- Exit Kodi
- Move the video folders to the new location(s)
- Start Kodi
- Video Clean Library
- Video Scrape Library

The .nfo files from the Library Export will make a subsequent scraping a lot faster.

Hi, when you say "Activate the watched state and resume points settings in the advancedsettings.xml", what do you mean? My watched status seems to get recorded at the moment so I'm assuming I can skip that step?


RE: Edit video source location without losing DB entries? - dubwat - 2020-08-14

Warning!  I am not an expert...

Your movie location and watched status is saved in the database.  When you 'Video Clean Library', these data will be removed because the movies are not where Kodi thinks they should be.
When you 'Video Scrape Library', the watched status etc will be imported from the .nfo files you created when you did the 'Video Library Export (Using separate files)'

Check out https://kodi.wiki/view/Import-export_library/Video
Quote:<advancedsettings>
<videolibrary>
<exportautothumbs>false</exportautothumbs> <!-- Export auto-generated thumbs. Default = false. Change to true to allow export -->
<importwatchedstate>false</importwatchedstate> <!-- Import Last Played and Play Counts. Default = false. Change to true to allow import -->
<importresumepoint>false</importresumepoint> <!-- Import Resume Points. Default = false. Change to true to allow import -->
</videolibrary>
</advancedsettings>



RE: Edit video source location without losing DB entries? - Yachel - 2024-07-07

If you move your content to a new server location and update the source path in Kodi, it will likely recognize the files as new ones, potentially causing issues with maintaining your watch history and other database entries. To avoid this, you might need to use a method or tool to update the paths in your MySQL database directly. This way, Kodi can continue to recognize the files correctly without losing any data.
Speaking of maintaining data integrity, how do you handle video editing when moving source files to ensure all project links remain intact?


RE: Edit video source location without losing DB entries? - Anca - 2024-07-07

If you're moving your content to a new server location and want to avoid issues with Kodi recognizing the files as new ones, updating the paths in your MySQL database directly is a good solution. By doing this, Kodi can continue to recognize the files correctly without losing any data, ensuring your watch history and other database entries remain intact.


RE: Edit video source location without losing DB entries? - scott967 - 2024-07-09

This assumes you know/understand the table schema in the database and also SQL.

scott s.
.


RE: Edit video source location without losing DB entries? - Pisco - 2024-07-11

When moving source files for video editing, I make sure to update all file paths in the project settings to maintain the links. Using a consistent folder structure helps minimize issues. Do you have any specific tools you recommend for updating paths in a database?

Regarding video editing and maintaining project links, I found an article about Free Video Cutter Software in 2024 that might help. The article reviews various tools, highlighting their features and usability. Among the recommended software, Movavi stands out for its user-friendly interface and robust performance. Movavi not only supports multiple formats but also offers precise editing tools to ensure all your project links remain intact when moving source files. You can check out more details on their official page here <link removed>


RE: Edit video source location without losing DB entries? - DarrenHill - 2024-07-11

Given that's commercial software, the link is too close to being spam to be acceptable so has been removed.

Also I'm not entirely sure the whole post has anything to do with the thread topic?