I posed the following to Google AI and wondering if the response it accurate?
I‘m running Kodi Omega v21.2 on Windows 10 Pro. I have a new NAS that I need to repoint the libraries to. This also means that the user and password login will be different. As shown in the examples below the library folder names are the same, so just the root path to each library folder is changed.
For instance, “smb://Server3/video/TV Shows/” will become “smb:[//kennas1/media/](file://kennas1/media/)TV Shows/”
1) Is modifying these three files stored in “C:\Users\Admin\AppData\Roaming\Kodi\userdata“ all that’s needed while Kodi is closed? Or are exact paths stored in a db for each media that would also need to be changed?
2) Will I lose my watch history?
RESPONSE:
Yes—Kodi stores each library item’s exact path in its video database. Editing only those three XML files will update source browsing and credentials, but existing library entries will still reference smb://Server3/.... Kodi’s database stores paths separately from filenames, while watched state, last-played time, and resume points are attached to those file records. Kodi video database schema
The safest way to retain the existing library and watch history is:
- Close Kodi.
- Back up the entire %APPDATA%\Kodi\userdata directory.
- Update sources.xml and the SMB credentials.
- Add a path substitution in advancedsettings.xml so existing database paths transparently resolve to the new NAS:
<advancedsettings>
<pathsubstitution>
<substitute>
<from>smb://Server3/video/</from>
<to>smb://kennas1/media/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
If advancedsettings.xml already exists, add only the <pathsubstitution> section inside its existing <advancedsettings> element. Kodi officially supports partial network-path substitutions for precisely this kind of redirection. Kodi path substitution
Your configuration has at least one separate old root:
smb://Server3/Cinema Experience/
That needs its own substitution, assuming its new location is:
<substitute>
<from>smb://Server3/Cinema Experience/</from>
<to>smb://kennas1/media/Cinema Experience/</to>
</substitute>
Path matching may be case-sensitive in some contexts. Your files mix video/Video, so additional substitutions may be necessary for every capitalization actually present in the database.
Regarding the three files:
- sources.xml: Source locations shown in Kodi. Changing it does not rewrite existing database entries.
- mediasources.xml: Primarily network locations offered by the Browse dialog; it is not the video library database.
- passwords.xml: Maps paths to authenticated network URLs. Your current example appears malformed; a complete authenticated SMB URL normally resembles smb://username:password@server/share/. Kodi SMB source syntax
You should retain your watch history if you keep the current database and use path substitution. Do not remove the old sources, clean the library, and rescan from scratch before establishing a backup: newly scanned paths may be treated as new file records, potentially losing their association with existing play counts and resume points.
For extra insurance, export the video library before making changes. Kodi 21 exports and imports watched state and resume points by default. Kodi video library import/export
One security note: mediasources.xml in the project contains a plaintext, real-looking password. If it is genuine, consider changing it after this migration.