Tips & lessons learnt setting up an xbmc mysql database with shared thumbnails
#1
Lightbulb 
*please move to the tips&tricks section THANKS*

Hello,

These forums have been of great help to me in my endeavor to set up my own xbmc mysql sync'ed database *with shared thumbnails*, which as I understand it is the holy grail of home media goodness with a high WAF. So I wanted to share with you some tricks and lessons I learnt in the process, so that future users have an easier time setting up a similar system. It's important to note that I will not go deep into Linux specifics, since the logics can be applied to the other OS's and also I assume that if you are able to install it then you won't have much trouble understanding the tips.

This post is meant to complement the excellent guides: (which you should read in any case!)

Setting up the MySQL sync database:
http://lifehacker.com/#!5634515/how-to-s...-the-house

http://www.contentwhores.com/wordpress/?page_id=432

sharing the xbmc thumbnails between all the systems:
http://www.contentwhores.com/wordpress/?page_id=412


First of all let me describe the machines involved in my case:

1. A desktop PC running Linux Mint 10 (a distro based on Ubuntu), acting as the central server both for MySQL and the media files (=NAS duties), which we'll be calling 'Server'. Also functions as client for scraping purposes.
2. An HTPC running Windows 7 (client 1)
3. A Laptop running Windows 7 (client 2)
4. An eeepc laptop running windows xp (client 3)

Lesson 1:
The most important part in this is played by the server, which ideally has to be running 24/7 or at the very least every time you run XBMC on any of the computers.

Lesson 2:
If you are running a Ubuntu/Debian desktop, you will need to install MySQL. There is an easy way to do it which is setting up a LAMP server (Linux+Apache+MySQL+PHP) which as a bonus allows you to do lots of other cool stuff. You can easily do this by installing the package 'tasksel' and running it with sudo. You have to properly take note of the MySQL root password which the installation will ask you to enter, because you'll need it afterwards.

Lesson 3:
Properly setting up MySQL is capital.
To issue the 'CREATE DATABASE' mysql commands and so forth, you have to run mysql with 'mysql -u root -p' so it doesn't complain.
Also, you'll *want* to comment out the bind-address line as well as add 'skip-name-resolve' in /etc/mysql/my.cnf for a great speedup of the database. It makes a world of difference.


Lesson 4:
your source directories have to follow the guidelines as described in http://forum.xbmc.org/showthread.php?tid=38964
This will save a ton of headaches.

Lesson 5:
the sources (the media paths) in the library should be added as samba shares, as it will be understood by all OSes. It's also more elegant :-)

Lesson 6:
the thumbnails! Using symlinks for thumbnails is a great way to ensure it works without a hiccup, but unfortunately windows xp does not support it. I recommend upgrading the OS or else devise a backup system to replicate the thumbnails directory share.

Lesson 7:
you do not need to run xbmc on the server but it has to be up and running in order to serve the files and the mysql database

Lesson 8:
Ethernet is preferrable when viewing HD but the mysql database+thumbnails combo will also happily work with wireless G networks.



A setup like this allows multiple clients to access the same database at the same time, updating the thumbnails without any collisions or problems.

Happiness!! :-D

Thanks to: Fasteddy, DC_Williamson, Lifehacker and whoever is running contentwhores ;-)
Reply

Logout Mark Read Team Forum Stats Members Help
Tips & lessons learnt setting up an xbmc mysql database with shared thumbnails0