Kodi Community Forum

Full Version: two xbmc players with a shared library working well
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have had one Ion based Xbmc player with local disk running well for over a year. I recently got a cheap bedroom 32in LCD an wanted a similar player utilizing the same library.

I tried dlna in the TV but had mixed results and inconsistent functionality between the two setups. I ended up getting another Asus Ion player and read all the articles here. This was the clearest.

wiki.xbmc.org/index.php?title=HOW-TO:Synchronize_multiple_XBMC_libraries

Unfortunately the convert article link doesn't have any content yet so i couldnt work out how to change my local drive sources. I ended up clearing out my library deleting the local drive sources, installing samba and sharing out the media directory and the thumbs directory and then readded the sources using the shares instead of the local path. I had to go back through and reset watched status of those I had already seen and redownload the fanart. I then exported the library to a file.

I then installed MySQL server and setup the databases and the advancedsettings.XML file and imported the database. Everything still working so I built the secondary player and installed MySQL client and editted the advancedsettings.XML file for the SQL and thumbs mappings.

Amazingly everything worked. The only issue was the thumbs mapping path listed in the XML file. I couldn't use $HOME in the path and had to fully expand it.

Very happy with the performance and the functionality. Thanks to everyone who has worked on xbmc and hope others give this a shot as its easier than I thought it would be.

Matt
I've got an Atom/ION based HTPC running XBMC 10.1 on Windows 7, and my media is stored on an smb share on another Windows machine on my LAN. I've decided that I really only use the HTPC for XBMC, so I set XBMC as the Windows shell, but Win7 still takes a few minutes to boot up.

As a result, I'm considering running an XBMC Live installation from either an SD card or a secondary hard drive partition (probably a can of worms in itself, as I don't have an optical drive that I can use to install from). However, I'd want to keep the two installations synced in case I decide to go back. I have a headless Xubuntu 11.10 x64 server that can host a MySQL database, but I have some questions about the wiki article you linked:
  • Why is it necessary to import a previously-exported local database if the whole point is to use a remote SQL database instead? I guess the local XBMC installations must maintain full local copies of the data in case you want to disconnect from the remote sync database or something?
  • Given that I'd be using the remote SQL database to sync a Windows XBMC installation with a Linux (XBMC Live) one, will I have trouble with paths due to the use of two different OSes? I would of course ensure that I am using smb paths instead of mapped drive letters, but I guess I'm wondering if XBMC's smb path format is OS-independent.
Hi there.

If your current local non SQL database uses shares then the export and reimport into SQL preserves all your watched status and other information which can be quite valuable. Yours is on shares by the sounds of it so you can export the library and then reimport it into SQL once you have configured SQL, with no issues and nothing will appear to have changed.

If it isn't on shares like mine, then the only reason I did it was to have a local copy of the libary database in the event that I found the SQL implementation had issues I could easily roll back. You would already have a local database so you can skip this step. As I had to convert to shares I had to blow away my local library database.

The SMB/CIFS sharing under XBMCLive appears to be identical to Windows so I can't see any issues with running a mixed implementation. In my advancedsettings.xml file I have a standard path \\servername\sharename referenced and even though that share is on a linux box running samba all my windows clients can see it with no issues.

You can install XBMCLive from a USB stick however I am not sure if you can setup dual boot from inside the installer, I suspect you might need to install Grub or something and do some partitioning before you boot from the USB install.

Matt.
Thanks for the comments/ideas.

Import/Export: The Wiki page suggests that the local non-SQL database should be imported into each XBMC install. That seemed odd to me; I would have expected that it should all be imported into SQL and nowhere else. Maybe I'm misunderstanding it, or maybe it's just a redundant step to allow less painful rollback to non-SQL (as you mentioned).

Shares: I'm indeed using smb shares, with my media on a 2TB drive in my Windows desktop.

XBMC Live install: My Revo has an SD slot and USB, so I might try a USB-to-SD install as Plan A for potentially faster booting and to avoid partitioning of the hard drive - plus I could just pop out the SD card to boot Windows instead.

I did see an old thread suggesting that a 9.x version of XBMC Live may have ran slow from USB/SD, but hopefully that's been resolved in the newer version(s). If not, the HDD in my HTPC is plenty big enough for partitioning, and doing so wouldn't be a huge deal.
The article mentions importing the library database into SQL from ANY of the machines because as you say with a central database it's only held in one place and any of the machines can access it.

I ran 10.x from a flash drive with no issues at all, the XBMCLive installer will run from a usb stick and set it up to run from the stick so I can't see you having any problems.

As you have your content on shares now you should be able to export your library, install MySQL server, create the databases and edit the xml files and then reimport your libary and be away and racing. You will need to install Samba so you can share your thumbs directory.

Cheers
Matt.
Installed mysql in Xubuntu 11.10 using apt-get instead of from the download linked in the wiki article.

I now understand that when you do an import after putting advancedsettings.xml in place, it imports to MySQL instead of the local userdata file structure.

It's importing now, but I was getting access denied errors in the MySQL logs at first. The only end-user symptom of this on the XBMC client is that the import goes really fast and then you have no library at the end. I believe this was happening because the wiki article is missing a step for setting the password for the xbmc user in the MySQL database; fortunately, I found a MySQL troubleshooting article on the MythTV wiki that showed me what to do: http://www.mythtv.org/wiki/Category:MySQL - I basically replaced 'mythtv' with 'xbmc' everywhere, and 'localhost' with '%' (since the point is to be able to connect from XBMC clients running on arbitrary machines on the network).