Quantcast
Channel: Adam Zwakk » Tutorials
Viewing all articles
Browse latest Browse all 10

How I synced 2 installs of XBMC with MySQL to provide the best home entertainment experience ever

$
0
0

I love XBMC and how it handles all the metadata and organization for you in a slick interface. I’ve blogged about XBMC a number of times but I wanted to do something more… hackery. Something that improved XBMC’s WAF (Wife Approval Factor) and have it more automated.

I decided to turn an old AMD 64 X2 PC into another XBMC machine. I beefed it up with 6GB of RAM and a nVidia 560 card (I recently upgraded my PC to a 660ti) so it has native HDMI audio/video out and it works awesomely. I got this running with Windows 7 and a fresh install of XBMC Eden, SABNZBD, and Sickbeard. I also put the Community version of MySQL on it and ran it as a service. I made a user just for XBMC stuff.

Second PC: I got a Zotac Zbox and put it in the bedroom. It has built in 802.11n Wi-Fi so it works almost perfectly with HD content (plus the ION chip is awesome too).

I made a custom advancedsettings.xml file and put this in it

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.100</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.1.100</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>

And I also made all the source paths network paths so they would be identical on any machine I give it. (I also synced the thumbnails/fanart by following this and adding it to the same file)

I got my “server” PC to fill the database with all my media and it went in the MySQL beautifully. Something that isn’t highlighted in the XBMC docs BUT IS VERY IMPORTANT (and took me an hour to figure it out) is to make sure something is favorited, marked as watched, and something is resumable. If you don’t do this, the queries it makes will fail because it’s looking for those IDs. (I get it from a database perspective, but it’s still lazy for it to NEED that)

Once both PCs had the same advancedsettings.xml they both worked with each other flawlessly. You can pause on one machine and resume on another. They both show what you’ve watched. They both get updated when something new comes out. It’s all centralized to that MySQL and IT’S HEAVEN. The ability to pause a movie and get up and watch it somewhere else was jaw-droppingly awesome to me. Especially when you don’t have to rely on a third party service (pointing fingers at TV providers doing something similar for extra cost)

If you have an extra PC, definitely try this out.


Viewing all articles
Browse latest Browse all 10

Trending Articles