MySQL/Sync other parts of Kodi: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
m (Text replacement - "userdata folder" to "userdata folder")
 
(33 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{:HOW-TO:Sync multiple libraries/Contents}}
{{:MySQL/Contents}}
Many other things can be synced using [[path substitution]]. Note that you can also use the [[HOW-TO:Sync multiple libraries/Advanced notes#Symlink alternative to Path substitution|Symlink instructions]] if your OS supports it. '''DO NOT TRY TO SHARE DATABASES.''' This works with both directories and single files '''(requires at least v11/Eden RC1 for single files)'''. The following directories and files are known to be safe for this task:
{{mininav| [[MySQL]] }}
{{divbox|orange||'''Note:''' Path substitution or any kind of sharing of setting files is not officially supported (with the exception of playlists). It probably won't hurt anything, but some things might not always work right depending on what you are substituting. The following settings on this page are believed to work okay, but if something doesn't work out, just copy the file instead of trying to share/pathsub it.}}
 
'''OPTIONAL'''
 
Many things can be synced using [[path substitution]].  
 
'''DO NOT TRY TO SHARE DATABASES WITH THIS METHOD.'''
 
This works with both directories and single files. The following directories and files are generally safe to share between Kodi devices:
__TOC__
__TOC__
{{-}}
{{-}}
==Steps==
==Steps==
#Share your existing [[userdata folder]] or a new folder with those files via NFS, SMB, or AFP (make sure have write access, not just read-only access). Most users to do this from the same computer/device as the MySQL server.
#Share your existing [[Userdata|userdata folder]] or a new folder with those files via NFS, SMB, or AFP (make sure have write access, not just read-only access). Most users to do this from the same computer/device as the MySQL server.
#{{highlight|bordered=yes|Copy the text from the right hand boxes and add it to your '''advancedsettings.xml''' file, between the <code><pathsubstitution></code> and <code></pathsubstitution></code> tags.}}
#{{highlight|bordered=yes|Copy the text from the right hand boxes and add it to your '''advancedsettings.xml''' file, between the <code><pathsubstitution></code> and <code></pathsubstitution></code> tags.}}
#Note/copy the network path of your shared data folder and use that to replace '''PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/''', for example an SMB share holding your playlists use <code>smb://NAS/share/xbmc_stuff/Playlists/</code>
#Note/copy the network path of your shared data folder and use that to replace '''PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/''', for example an SMB share holding your playlists use <code>smb://NAS/share/kodi_stuff/Playlists/</code>
#Make sure all XBMC devices that are being synced have this addition to their ''advancedsettings.xml'' file.<br/><br/>
#Make sure all Kodi devices that are being synced have this addition to their ''advancedsettings.xml'' file.<br/><br/>


===Playlists===
===Playlists===
Line 15: Line 24:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/playlists/</from>
     <from>special://profile/playlists/</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/playlists/</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/playlists/</to>
  </substitute>
</pre>
|}
The Playlist folder in XBMC contains music, video and mixed [[playlists]]. If you have imported from pre-existing media libraries then you can use your old playlist folder to save time on recreating the various playlists.  If your playlists include local file paths, you will need to edit them to use network shares instead.
{{-}}<br/><br/>
 
===Add-on data===
{| class="infobox"
|-
|
<pre>
  <substitute>
    <from>special://masterprofile/addon_data/</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/addon_data/</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
The Playlist folder in Kodi contains music, video and mixed [[playlists]]. If you have imported from pre-existing media libraries then you can use your old playlist folder to save time on recreating the various playlists.  If your playlists include local file paths, you will need to edit them to use network shares instead.
{{-}}<br/><br/>
{{-}}<br/><br/>


Line 43: Line 38:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/keymaps/</from>
     <from>special://profile/keymaps/</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/keymaps/</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/keymaps/</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
Useful if you want the controls on all your Kodi devices to be the same. Might not be a good idea if you use different types of remotes on different devices, as you'll likely want to have individual configurations for them.
{{-}}<br/><br/>
{{-}}<br/><br/>


Line 57: Line 52:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/sources.xml</from>
     <from>special://profile/sources.xml</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/sources.xml</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/sources.xml</to>
   </substitute>
   </substitute>
   <substitute>
   <substitute>
     <from>special://masterprofile/mediasources.xml</from>
     <from>special://profile/mediasources.xml</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/mediasources.xml</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/mediasources.xml</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
The sources.xml file contains a list of all the sources your media will be collected from, including both local and network-based media. This will also allow you to sync everything that is just in Files view and not in the video library.
 
If an Kodi device has a source that is specific to it (such as on an internal hard drive that is not shared with the rest of the devices) then you might not want to share sources.xml.
 
mediasources.xml is similar to sources.xml, but only effects the options seen when you add a new source and select "browse". It really doesn't matter much if you share this file or not.
{{-}}<br/><br/>
{{-}}<br/><br/>


Line 75: Line 74:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/RssFeeds.xml</from>
     <from>special://profile/RssFeeds.xml</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/RssFeeds.xml</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/RssFeeds.xml</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
This file tells Kodi what RSS feed to show on the home screen, if enabled.
{{-}}<br/><br/>
{{-}}<br/><br/>


Line 89: Line 88:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/favourites.xml</from>
     <from>special://profile/favourites.xml</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/favourites.xml</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/favourites.xml</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
This will sync your [[favorites]] selections between all Kodi devices. If the favorite depends on a file path that is specific to one  device then this might not work for the other devices.
{{-}}<br/><br/>
{{-}}<br/><br/>


===Profiles===
===Network share passwords===
{| class="infobox"
{| class="infobox"
|-
|-
Line 103: Line 102:
<pre>
<pre>
   <substitute>
   <substitute>
     <from>special://masterprofile/profiles.xml</from>
     <from>special://profile/passwords.xml</from>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/xbmc/userdata/profiles.xml</to>
     <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/passwords.xml</to>
   </substitute>
   </substitute>
</pre>
</pre>
|}
|}
{{editor note|Note what this is and why you would want to do it}}
If your network shares use passwords (at least for SMB) then you will need to manually copy the passwords.xml file over to each Kodi device. This file keeps track of those passwords.
{{-}}<br/><br/>
 
{{Isengard updated}}

Latest revision as of 10:18, 19 July 2020

Share libraries w/MySQL, guide:

  1. Introduction
  2. Setting up MySQL
  3. Setting up Kodi
Home icon grey.png   ▶ MySQL ▶ Sync other parts of Kodi

OPTIONAL

Many things can be synced using path substitution.

DO NOT TRY TO SHARE DATABASES WITH THIS METHOD.

This works with both directories and single files. The following directories and files are generally safe to share between Kodi devices:


Steps

  1. Share your existing userdata folder or a new folder with those files via NFS, SMB, or AFP (make sure have write access, not just read-only access). Most users to do this from the same computer/device as the MySQL server.
  2. Copy the text from the right hand boxes and add it to your advancedsettings.xml file, between the <pathsubstitution> and </pathsubstitution> tags.
  3. Note/copy the network path of your shared data folder and use that to replace PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/, for example an SMB share holding your playlists use smb://NAS/share/kodi_stuff/Playlists/
  4. Make sure all Kodi devices that are being synced have this addition to their advancedsettings.xml file.

Playlists

  <substitute>
    <from>special://profile/playlists/</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/playlists/</to>
  </substitute>

The Playlist folder in Kodi contains music, video and mixed playlists. If you have imported from pre-existing media libraries then you can use your old playlist folder to save time on recreating the various playlists. If your playlists include local file paths, you will need to edit them to use network shares instead.


Keymaps

  <substitute>
    <from>special://profile/keymaps/</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/keymaps/</to>
  </substitute>

Useful if you want the controls on all your Kodi devices to be the same. Might not be a good idea if you use different types of remotes on different devices, as you'll likely want to have individual configurations for them.


Sources

  <substitute>
    <from>special://profile/sources.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/sources.xml</to>
  </substitute>
  <substitute>
    <from>special://profile/mediasources.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/mediasources.xml</to>
  </substitute>

The sources.xml file contains a list of all the sources your media will be collected from, including both local and network-based media. This will also allow you to sync everything that is just in Files view and not in the video library.

If an Kodi device has a source that is specific to it (such as on an internal hard drive that is not shared with the rest of the devices) then you might not want to share sources.xml.

mediasources.xml is similar to sources.xml, but only effects the options seen when you add a new source and select "browse". It really doesn't matter much if you share this file or not.


RSS Feeds

  <substitute>
    <from>special://profile/RssFeeds.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/RssFeeds.xml</to>
  </substitute>

This file tells Kodi what RSS feed to show on the home screen, if enabled.


Favourites

  <substitute>
    <from>special://profile/favourites.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/favourites.xml</to>
  </substitute>

This will sync your favorites selections between all Kodi devices. If the favorite depends on a file path that is specific to one device then this might not work for the other devices.


Network share passwords

  <substitute>
    <from>special://profile/passwords.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/passwords.xml</to>
  </substitute>

If your network shares use passwords (at least for SMB) then you will need to manually copy the passwords.xml file over to each Kodi device. This file keeps track of those passwords.