Revision as of 08:34, 11 October 2018

Path substitutions are settings in advancedsettings.xml to force Kodi to use different file paths. These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for Kodi to handle. Path subs work for most file and folder paths. Path subs work across local and network paths, across different network protocols, and can even be used with some of the special protocol.

Note:Not all special paths can be substituted. In particular, special://musicplaylists/ and special://videoplaylists/ should not be substituted, as internally these are multipaths that cannot be written to (thus saving of playlists will go elsewhere). Instead, one should use the advanced setting <system><playlistpath> to change this.

2 Moving the userdata folder on Android

3 Special notes about path substitution for userdata files

Path substitution is not officially supported for settings files. It probably won't hurt anything, but some things might not always work right depending on what you are substituting.

Thumbnails

Sharing the Thumbnails folder with Path Substitution is prone to problems, primarily because the Texture Cache consists of two interlinked data stores - the Thumbnails folder and the SQLite database Textures13.db. Sharing the SQLite Textures13.db between multiple clients is not supported under any circumstances due to the liklehood of database corruption.

Since sharing of the database is not realistically possible, attempts at sharing only the Thumbnails folder will either fail completely, or result in some artwork items never being displayed, or you may experience artwork being displayed but with higher or lower than expected image quality or even image corruption (a result of different clients overwriting previously cached artwork, as not all clients cache artwork at the same resolutions, or even use the same image formats).

If you must use Path Substitution to relocate (rather than share) your Thumbnails folder, by all means do so but only for individual clients and their associated Thumbnails folder. Do not share a single Thumbnails folder between multiple clients, as the Texture Cache is simply not designed to support this and you will experience problems.