Path substitution: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 3: Line 3:


== Examples ==
== Examples ==
Save as "advancedsettings.xml" in your [[userdata folder]]:
;Example 1 - changing the path of music files
<pre>
<pre>
<advancedsettings>
<advancedsettings>
Line 14: Line 17:
</pre>
</pre>


;Example 2 - changing where thumbnails are stored
{{note|This will slowdown thumbnail loading, but might be worth it for low-memory devices such as the [[ATV2]].}}
<pre>
<pre>
<advancedsettings>
<advancedsettings>
Line 25: Line 31:
</pre>
</pre>


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.
 
{{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.}}


== See also ==
== See also ==

Revision as of 14:19, 11 January 2014

Path substitutions are settings in advancedsettings.xml to force XBMC 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 XBMC to handle. Starting in XBMC v11 (Eden) path subs works for most file paths. Path subs work across local and network paths, across different network protocols, and can even be used with the special protocol (see note below).

Examples

Save as "advancedsettings.xml" in your userdata folder:

Example 1 - changing the path of music files
<advancedsettings>
 <pathsubstitution>
  <substitute>
    <from>SMB://192.168.1.19/Music/</from>
    <to>G:\Music\</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>


Example 2 - changing where thumbnails are stored

Note: This will slowdown thumbnail loading, but might be worth it for low-memory devices such as the ATV2.

<advancedsettings>
 <pathsubstitution>
  <substitute>
    <from>special://masterprofile/Thumbnails/</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/Thumbnails/</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>


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.

See also