Recently, we featured an article on sharing your playstate and watched status with MediaBrowser for WMC. One of my main reasons for using the software was the shared library features. Today, with XBMC you are able to perform the same functions. The process is a bit more difficult, but well worth it.
If you are a user that stores their media on a NAS like QNAP or Thecus then your process will be a bit easier than those of you that don’t. For XBMC to share this information with other Media Centers in your home, it uses MySQL and because we are such big fans of running a NAS instead of a server, this tutorial will focus the installation towards this.
Thecus:
Start by using the application server to install MySQL. Luckily for you, Thecus bundles in phpMyAdmin with the auto module installation to allow for easy administration.
QNAP:
Ensure that MySQL is enabled by using the web administration and navigating to Application Servers then to MySQL Server. Enable MySQL server and leave the port at 3306. After you have enabled MySQL you can make your life much simpler by installing the QPKG for phpMyAdmin.
Depending on your version of phpMyAdmin, your interface may look a bit different.
1. From phpMyAdmin select the option to run an SQL Query.
2. Enter the following commands in the new SQL Query window. These commands will create a user named xbmc in your database and apply the privileges needed to allow XBMC to write and modify the databases and records within the databases.
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';<br /> GRANT ALL ON *.* TO 'xbmc';
3. Create a file named advancedsettings.xml. This file lets XBMC know where your MySQL database is located, the username and password of the user with privileges to the database, and the names of the databases. You can create the file yourself and save it in the proper location or you can download our template and modify it to your needs. The content of the document should be: (You must replace the IP address of our server below with the IP address of yours)
<advancedsettings> <videodatabase> <type>mysql</type> <host>192.168.1.10</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> <name>xbmc_videos</name> </videodatabase> <musicdatabase> <type>mysql</type> <host>192.168.1.10</host> <port>3306</port> <user>xbmc</user> <pass>xbmc</pass> <name>xbmc_music</name> </musicdatabase> </advancedsettings>
Download: advancedsettings.zip
Save the file in: (You need to copy everything in bold if you are going to copy and paste)
- Windows 7: %appdata%\XBMC\usersdata
- Windows XP: C:\Documents and Settings\
\Application Data\XBMC\userdata\ - MacOS X: Finder, click the Go menu and select the Go to Folder … option. Go to the folder, paste the following: ~/Library/Application Support/XBMC/userdata. Click Go
- Linux: ~/.xbmc/userdata
Note: Your library needs to be configured as such:
smb://name_or_IP_address_of_server/movies. You cannot use an \\ in your library paths.
Now all you need to do is copy your advancedsettings.xml file to the XBMC folder noted above on all of your installations and you are ready to go! Enjoy!
Thanks
I have the database up and running now.
How about synchronizing the thumbails and having them stored on the NAS (I have a Thecus)? I am trying to do this but with little success.
Thanks for the article.
I prefer to store the thumbs locally. My collection is rather large and having images stored on a NAS just wouldn’t be efficient. If you can avoid it, I probably would.
Try this article for sharing thumbnail cache:
http://tweaking4all.com/home-theater/xbmc-and-others/xbmc-shared-thumbnail-cache
Hi
Thanks for the article.
However@ stage 2 I receive the following error:
Error
SQL query:
CREATE USER ‘xbmc’ IDENTIFIED BY ‘xbmc’;
MySQL said:
#1396 – Operation CREATE USER failed for ‘xbmc’@’%’
any ideas?
Thanks
Check on the privilges tab of phpMyAdmin. You may already have the user created. You may get a notification “MySQL returned an empty result set (i.e. zero rows)”, but the user should still show
Also, are you logged in with enough privs to allow user creation? ie, root/admin?