NOTICE: Account creation on the wiki has been temporarily disabled until the wiki is moved to OpenID. If you need an account before then, please request one here: http://forum.xbmc.org/showthread.php?tid=165868

HOW-TO:Share libraries using MySQL/Setting up XBMC

From XBMC
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
  
 
{{-}}
 
{{-}}
==Steps==
+
==Setting up one or more users==
 
{| class=infobox
 
{| class=infobox
 
| advancedsettings.xml:
 
| advancedsettings.xml:
Line 15: Line 15:
 
         <user>xbmc</user>
 
         <user>xbmc</user>
 
         <pass>xbmc</pass>
 
         <pass>xbmc</pass>
 +
      <name>profilenamehere_video</name>
 
     </videodatabase>  
 
     </videodatabase>  
  
Line 23: Line 24:
 
         <user>xbmc</user>
 
         <user>xbmc</user>
 
         <pass>xbmc</pass>
 
         <pass>xbmc</pass>
 +
        <name>profilenamehere_music</name>
 
     </musicdatabase>
 
     </musicdatabase>
 
</advancedsettings></pre>
 
</advancedsettings></pre>
 
|}
 
|}
 +
 +
 +
 +
=== Main/Master Profile===
 +
{{highlight|bordered=yes|The master profile is located in xbmc/userdata.}}
 +
 
#Open XBMC on the computer that has the library you want to share ''(If you have not created a library yet you can skip this step)''
 
#Open XBMC on the computer that has the library you want to share ''(If you have not created a library yet you can skip this step)''
##Export the Video Library by doing the following:
+
##Export the Video Library by doing the following for each profile:
 
###Go to '''System/Settings -> Video -> Library''' and select '''Export library'''
 
###Go to '''System/Settings -> Video -> Library''' and select '''Export library'''
 
###Select '''Single file'''
 
###Select '''Single file'''
##Export the Music Library by doing the following:
+
##Export the Music Library by doing the following for each profile:
 
###Go to '''System/Settings -> Music -> Library''' and select '''Export library'''
 
###Go to '''System/Settings -> Music -> Library''' and select '''Export library'''
 
###Select '''Single file'''
 
###Select '''Single file'''
#Create (or add to, if you already have one) an advancedsettings.xml file:
+
#Create (or add to, if you already have one) an advancedsettings.xml file for the main user:
 
##Open up a plain text editor
 
##Open up a plain text editor
 
##Copy and paste the text from the right-hand box into a new text document
 
##Copy and paste the text from the right-hand box into a new text document
 
##Replace the two instances of <code>***.***.***.***</code> with local network IP address of your MySQL server
 
##Replace the two instances of <code>***.***.***.***</code> with local network IP address of your MySQL server
 +
##Replace the instance of <name>'''profilenamehere'''_video</name> with the main profile name.
 +
##Replace the instance of <name>'''profilenamehere'''_music</name> with the main profile name.
 
##Save the file as '''advancedsettings.xml'''
 
##Save the file as '''advancedsettings.xml'''
 
#Copy this ''advancedsettings.xml'' file you just created to the userdata folder of every XBMC install you want to sync with:
 
#Copy this ''advancedsettings.xml'' file you just created to the userdata folder of every XBMC install you want to sync with:
Line 52: Line 62:
 
###Select the file you saved from the first step when you exported your music library
 
###Select the file you saved from the first step when you exported your music library
 
#You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.
 
#You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.
 +
 +
=== Additional Profiles ===
 +
{{highlight|bordered=yes|An example of when you would want to use this: using a kids profile and an adult profile.}}
 +
 +
{{highlight|bordered=yes|Additional profiles are located in xbmc/userdata/profiles/profilename/.}}
 +
 +
To add a profile please visit the '''[[Profiles|Profile wiki]]'''.
 +
 +
#Open XBMC on the computer that has the library you want to share and log in as the new profile ''(If you have not created a library yet you can skip this step)''
 +
##Export the Video Library by doing the following for each profile:
 +
###Go to '''System/Settings -> Video -> Library''' and select '''Export library'''
 +
###Select '''Single file'''
 +
##Export the Music Library by doing the following for each profile:
 +
###Go to '''System/Settings -> Music -> Library''' and select '''Export library'''
 +
###Select '''Single file'''
 +
#Create (or add to, if you already have one) an advancedsettings.xml file for the additional user:
 +
##Open up a plain text editor
 +
##Copy and paste the text from the right-hand box into a new text document
 +
##Replace the two instances of <code>***.***.***.***</code> with local network IP address of your MySQL server
 +
##Replace the instance of <name>'''profilenamehere'''_video</name> with the additional profile name.
 +
##Replace the instance of <name>'''profilenamehere'''_music</name> with the additional profile name.
 +
##Save the file as '''advancedsettings.xml'''
 +
#Copy this ''advancedsettings.xml'' file you just created to the userdata\profiles\'''profilename'''\ folder of every XBMC install you want to sync with:
 +
#* '''Windows XP:''' <code>Documents and Settings\<your_user_name>\Application Data\XBMC\userdata\profiles\'''profilename'''\advancedsettings.xml</code>
 +
#* '''Vista/Windows 7:''' <code>Users\<your_user_name>\AppData\Roaming\XBMC\userdata\profiles\'''profilename'''\advancedsettings.xml</code>
 +
#* '''Mac OS X:''' <code>/Users/<your_user_name>/Library/Application Support/XBMC/userdata/profiles/'''profilename'''/advancedsettings.xml</code>
 +
#* '''iOS:''' <code>/private/var/mobile/Library/Preferences/XBMC/userdata/profiles/'''profilename'''/advancedsettings.xml</code>
 +
#* '''Linux:''' <code>$HOME/.xbmc/userdata/profiles/'''profilename'''/advancedsettings.xml</code>
 +
#Open any of your XBMC installs, log in as the new profile, and re-import your library data  ''(If you have not created a library yet you can skip this step)''
 +
##Import the Video Library by doing the following:
 +
###Go to '''System/Settings -> Video -> Library''' and select '''Import library'''
 +
###Select the file you saved from the first step when you exported your video library
 +
##Import the Music Library by doing the following:
 +
###Go to '''System/Settings -> Music -> Library''' and select '''Import library'''
 +
###Select the file you saved from the first step when you exported your music library
 +
#You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.
 +
  
  

Revision as of 05:03, 27 April 2012

Share libraries w/MySQL, guide:

  1. Introduction
  2. Setting up MySQL
  3. Setting up XBMC

Each device that will be sharing a library will need an advancedsetting.xml file.


1 Setting up one or more users

advancedsettings.xml:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
       <name>profilenamehere_video</name>
    </videodatabase> 

    <musicdatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>profilenamehere_music</name>
    </musicdatabase>
</advancedsettings>


1.1 Main/Master Profile

 The master profile is located in xbmc/userdata. 

  1. Open XBMC on the computer that has the library you want to share (If you have not created a library yet you can skip this step)
    1. Export the Video Library by doing the following for each profile:
      1. Go to System/Settings -> Video -> Library and select Export library
      2. Select Single file
    2. Export the Music Library by doing the following for each profile:
      1. Go to System/Settings -> Music -> Library and select Export library
      2. Select Single file
  2. Create (or add to, if you already have one) an advancedsettings.xml file for the main user:
    1. Open up a plain text editor
    2. Copy and paste the text from the right-hand box into a new text document
    3. Replace the two instances of ***.***.***.*** with local network IP address of your MySQL server
    4. Replace the instance of <name>profilenamehere_video</name> with the main profile name.
    5. Replace the instance of <name>profilenamehere_music</name> with the main profile name.
    6. Save the file as advancedsettings.xml
  3. Copy this advancedsettings.xml file you just created to the userdata folder of every XBMC install you want to sync with:
    • Windows XP: Documents and Settings\<your_user_name>\Application Data\XBMC\userdata\advancedsettings.xml
    • Vista/Windows 7: Users\<your_user_name>\AppData\Roaming\XBMC\userdata\advancedsettings.xml
    • Mac OS X: /Users/<your_user_name>/Library/Application Support/XBMC/userdata/advancedsettings.xml
    • iOS: /private/var/mobile/Library/Preferences/XBMC/userdata/advancedsettings.xml
    • Linux: $HOME/.xbmc/userdata/advancedsettings.xml
  4. Open any of your XBMC installs and re-import your library data (If you have not created a library yet you can skip this step)
    1. Import the Video Library by doing the following:
      1. Go to System/Settings -> Video -> Library and select Import library
      2. Select the file you saved from the first step when you exported your video library
    2. Import the Music Library by doing the following:
      1. Go to System/Settings -> Music -> Library and select Import library
      2. Select the file you saved from the first step when you exported your music library
  5. You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.

1.2 Additional Profiles

 An example of when you would want to use this: using a kids profile and an adult profile. 

 Additional profiles are located in xbmc/userdata/profiles/profilename/. 

To add a profile please visit the Profile wiki.

  1. Open XBMC on the computer that has the library you want to share and log in as the new profile (If you have not created a library yet you can skip this step)
    1. Export the Video Library by doing the following for each profile:
      1. Go to System/Settings -> Video -> Library and select Export library
      2. Select Single file
    2. Export the Music Library by doing the following for each profile:
      1. Go to System/Settings -> Music -> Library and select Export library
      2. Select Single file
  2. Create (or add to, if you already have one) an advancedsettings.xml file for the additional user:
    1. Open up a plain text editor
    2. Copy and paste the text from the right-hand box into a new text document
    3. Replace the two instances of ***.***.***.*** with local network IP address of your MySQL server
    4. Replace the instance of <name>profilenamehere_video</name> with the additional profile name.
    5. Replace the instance of <name>profilenamehere_music</name> with the additional profile name.
    6. Save the file as advancedsettings.xml
  3. Copy this advancedsettings.xml file you just created to the userdata\profiles\profilename\ folder of every XBMC install you want to sync with:
    • Windows XP: Documents and Settings\<your_user_name>\Application Data\XBMC\userdata\profiles\profilename\advancedsettings.xml
    • Vista/Windows 7: Users\<your_user_name>\AppData\Roaming\XBMC\userdata\profiles\profilename\advancedsettings.xml
    • Mac OS X: /Users/<your_user_name>/Library/Application Support/XBMC/userdata/profiles/profilename/advancedsettings.xml
    • iOS: /private/var/mobile/Library/Preferences/XBMC/userdata/profiles/profilename/advancedsettings.xml
    • Linux: $HOME/.xbmc/userdata/profiles/profilename/advancedsettings.xml
  4. Open any of your XBMC installs, log in as the new profile, and re-import your library data (If you have not created a library yet you can skip this step)
    1. Import the Video Library by doing the following:
      1. Go to System/Settings -> Video -> Library and select Import library
      2. Select the file you saved from the first step when you exported your video library
    2. Import the Music Library by doing the following:
      1. Go to System/Settings -> Music -> Library and select Import library
      2. Select the file you saved from the first step when you exported your music library
  5. You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.


Personal tools
Namespaces
Variants
Actions
Navigation
Wiki help
Google Search
Toolbox