MySQL/Setting up Kodi: Difference between revisions
No edit summary |
|||
Line 11: | Line 11: | ||
See [[:Category:File Sharing]] for some of the file sharing methods that work with XBMC. | See [[:Category:File Sharing]] for some of the file sharing methods that work with XBMC. | ||
==MySQL advancedsettings== | ==MySQL advancedsettings== | ||
Line 82: | Line 33: | ||
<pass>xbmc</pass> | <pass>xbmc</pass> | ||
</musicdatabase> | </musicdatabase> | ||
<videolibrary> | |||
<importwatchedstate>true</importwatchedstate> | |||
</videolibrary> | |||
</advancedsettings></pre> | </advancedsettings></pre> | ||
<small>''See also this note about using the <name> tag: [[#Name tag]]''</small> | <small>''See also this note about using the <name> tag: [[#Name tag]]''</small> | ||
Line 104: | Line 59: | ||
#* '''Linux:''' <code>$HOME/.xbmc/userdata/advancedsettings.xml</code> | #* '''Linux:''' <code>$HOME/.xbmc/userdata/advancedsettings.xml</code> | ||
#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)'' | #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)'' | ||
##Import the Video Library by doing the following: Add the networked video source to XBMC and scan it in as if you were setting up your library for the first time (see [[adding videos to the library]]). However, XBMC will read the exported nfo files and images and use those instead of rebuilding the library from scratch. The end result will be an identical library. | ##Import the Video Library by doing the following: Add the networked video source to XBMC and scan it in as if you were setting up your library for the first time (see [[adding videos to the library]]). However, XBMC will read the exported nfo files and images and use those instead of rebuilding the library from scratch. The end result will be an identical library, and your watched status for videos will be preserved. | ||
##Import the Music Library by doing the following: Same idea as videos, but using the steps for [[adding music to the library]]. You'll end up with an identical library. | ##Import the Music Library by doing the following: Same idea as videos, but using the steps for [[adding music to the library]]. You'll end up with an identical 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. |
Revision as of 11:33, 6 February 2013
HOW-TO:Sync multiple libraries/Contents
Each device that will be sharing a library will need an advancedsetting.xml file.
Make files accessible over the network
If you haven't already done so, you will need to make your media files accessible to all your XBMC devices by sharing them on the network through file sharing. XBMC itself or the MySQL server will not share the actual files for this set up. Most operating systems have built-in methods for sharing files, or a NAS device can be used.
Most of XBMC's file sharing protocols will work except for UPnP, which does not work with the Library feature.
See Category:File Sharing for some of the file sharing methods that work with XBMC.
MySQL advancedsettings
advancedsettings.xml: |
<advancedsettings> <videodatabase> <type>mysql</type> <host>***.***.***.***</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> </videodatabase> <musicdatabase> <type>mysql</type> <host>***.***.***.***</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> </musicdatabase> <videolibrary> <importwatchedstate>true</importwatchedstate> </videolibrary> </advancedsettings> See also this note about using the <name> tag: #Name tag |
- 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:
- Go to System/Settings -> Video -> Library and select Export library
- Select Multiple files
- Export the Music Library by doing the following:
- Go to System/Settings -> Music -> Library and select Export library
- Select Multiple files
- Export the Video Library by doing the following:
- Create (or add to, if you already have one) an advancedsettings.xml file:
- 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
***.***.***.***
with local network IP address of your MySQL server - 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:
- 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
- Windows XP:
- 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)
- Import the Video Library by doing the following: Add the networked video source to XBMC and scan it in as if you were setting up your library for the first time (see adding videos to the library). However, XBMC will read the exported nfo files and images and use those instead of rebuilding the library from scratch. The end result will be an identical library, and your watched status for videos will be preserved.
- Import the Music Library by doing the following: Same idea as videos, but using the steps for adding music to the library. You'll end up with an identical 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.
- Note: If you want to update the library from any of the XBMC devices then they must all have the same sources set. See the Sources section of Part 6 for one method of keeping them in sync.
- Note: If you encounter error 1062, then you'll need to change your paths from "\\" to "//" as MySQL has trouble understanding "\\"
- Note: If you are using Eden, the video MySQL database will have 60 appended to the name (ex. video_database60). The music MySQL database will have 18 appended to the name (ex. music_database18).
Name tag
An additional <name>
tag can be used for both the video and music entries in advancedsettings.xml if you want to change the name of the database.
The name tag is not required (XBMC will use a default "MyVideos" and "MyMusic" DB name) and it is recommended to not include it if you only need one library, as some users have reported problems/bugs when it was included.
The tag is only needed if you want to have separate databases on the same MySQL server, like for more than one shared library. For example, if you want to create multiple profiles, each with their own shared library, so that each XBMC device can "log-into" that library.