Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HowTo: Centralize Your XBMC Library with MySQL

Featured Replies

If you want, you can have the thumbs local on all machines, but still in sync

 

I use dropbox (Granted it's all on windows machines) to sync the thumbs folder. Instead of using pathsubstitution, I used a symlink that points to the dropbox folder on each computer.

 

Not sure if you can install dropbox on openelec though, but it looks like some people have done it: http://openelec.tv/forum/65-storage/23455-solved-autostart-dropbox#23455

 

EDIT: I suggest you also look into adding skip-name-resolve to your mysql my.cnf if you haven't done it already. It didn't make a difference for me (my entry into library is already very quick) but some people claimed it worked for them

 

Seems to be issues with skp-name-resolve in the my.cnf if installed as I did with the unmenu package.  Referring to your  thread http://lime-technology.com/forum/index.php?topic=18417.msg167366#msg167366.  Will try doing the same on mine and see how it goes.

 

  • 1 month later...
  • Replies 195
  • Views 213.2k
  • Created
  • Last Reply

I implemented this myself this weekend and thought I would share my steps.

 

With XBMC Eden (I am using Openelec 2 beta 3), I did the following steps:

 

1. Install MySQL

  unRAID 5: http://lime-technology.com/forum/index.php?topic=20603.0

  unRAID 4: Install via unMenu

 

2. Follow this tut at OpenELEC to create xbmc-MySQL-user and grant all privileges (http://wiki.openelec.tv/index.php?title=Configure_MySQL_database - Adding indices is redundant for XBMC Eden, so don't follow this step)

 

3. If you want to share thumbnails and fanart, scrape your Movies/TV/Shows/Music locally and copy your thumbnails folder from your media center over to the server (I use my ssd cache drive for that scenario)

 

4. Now you have to add path-substitution, from now on thumbs and fanart will be fetched from the unRAID-server, plus you can also add your sources.xml

<advancedsettings>

    <videodatabase>

        <type>mysql</type>

        <host>xxx.xxx.xxx.xxx</host>

        <port>3306</port>

        <user>xbmc</user>

        <pass>xbmc</pass>

    </videodatabase>

<pathsubstitution>

<substitute>

<from>special://masterprofile/sources.xml</from>

<to>smb://xxx.xxx.xxx.xxx/apps/xbmc/userdata/sources.xml</to>

</substitute>

<substitute>

<from>special://masterprofile/Thumbnails/Video/</from>

<to>smb://xxx.xxx.xxx.xxx/apps/xbmc/userdata/Thumbnails/Video/</to>

</substitute>

</pathsubstitution>

</advancedsettings>

 

5. Copy advancedsettings.xml to all your other XBMC clients.

 

 

The performance of this setup is excellent.

  • 4 weeks later...

Thanks p1lot for the walk through. I had issues having openelec use the mySQL database. XBMC/openelec can now access the mySQL database after removing "<name>xbmc_video</name>" and "<name>xbmc_music</name>" from the advancedsettings.xml. I can't believe I missed that from comparing different tutorials. After restarting openelec,  MyMusic18 and MyVideos60 was created automatically in mySQL :)

The only item I really need shared is "Watched" shows...with Eden I installed Trakt and have been VERY pleased with the results.

 

As a side benefit I've now got a nice link to my media online :).

 

http://trakt.tv/user/Tybio

  • 1 month later...

One question on this. If i use SNAP and install a 16GB USB stick, is it possible to centralize the library there in order to avoid waking a disk every time any of my machines needs to use the data? Would it severely affect the speed of navigating through the library?

Its possible but i recommend a cheap ssd for that purpose. 64 gig crucial m4 and alike.

 

Sent from my GT-N7000 using Tapatalk 2

well i was thinking of also adding a ssd to speed up my thumbs and mysql but the nasty thing was ....

 

I added an Apple tv 2 in my bedroom .. jailbroke it and installed xbmc on it

and guess what ... this little stupid box was like 10 times faster then my full blown htpc computer / my i7 desktop and my kids desktop.....(all running w7 x64 ultimate)

 

so the issue had to be somewhere else ... so i changed my antivirus settings to allow all traffic from my unraid server.... without real time scanning ...

 

and yep the thumbs are nearly as fast now as the apple tv...

the mysql is still a tat slower from windows though ....

i have already

skip-name-resolve

in my.cnf

and already changed settings for a pretty big cache...

so there is still a windows setting that is making this slower then whatever freebsd version apple is using :P

 

 

any of you linux geniuses know if there is something else i can tweak ?

 

You should be asking for Windows geniuses, 'cos it's no doubt  MS' less-than-stellar IP stack that's at fault :P

You should be asking for Windows geniuses, 'cos it's no doubt  MS' less-than-stellar IP stack that's at fault :P

 

just hoping there are a few linux admins in here which had to solve this issue at work or so...

i know MS ip stack is hopeless....

reason why MS introduced MS SQL :P

  • 2 months later...

Is this howto still up to date? I want to centralize my xbmc library too..

Running eden...

Will it be slow with an old cache drive?  So no ssd

Yes - use p1lot's steps a couple of posts  above, they are fine for Eden.

Yes - use p1lot's steps a couple of posts  above, they are fine for Eden.

 

step 2 i dont need to do right?

step 3 sounds strange, so every time i scrape something i have to manually copy it over???

 

 

  • 2 weeks later...

Since there's no userscript for stopping/starting the mySQL process, how do you do it manually so you can stop/start the array?

That works for stopping, but how does one start it?

After applied all those steps, my xbmc on my mac becomes extremely slow. I can barely move cursor on the screen. Any idea why? This is my first time setup xbmc. I haven't even assign movie folders yet. 

 

It seems without the advanced settings file, XBMC works fine locally.

After applied all those steps, my xbmc on my mac becomes extremely slow. I can barely move cursor on the screen. Any idea why? This is my first time setup xbmc. I haven't even assign movie folders yet. 

 

It seems without the advanced settings file, XBMC works fine locally.

 

More than likely an issue with the MySQL database. I can't tell you which one, but that's the problem I get when I make a mistake with MySQL (suuuuuuuuper slow XBMC instances).

 

What does your advancedsettings.xml look like? Also, in MySQL on your unRAID box, add this when in MySQL (without quotes): "GRANT ALL ON *.* TO 'xbmc';" and press return

I host my database on my server so I made a small change to the GRANT option to allow everyone on my local network but would reject any connection from outside.

 

GRANT ALL ON *.'192.168.1.%' TO 'xbmc';

 

This allowed XBMC to create it's own database and every computer to access it.

My advancedsettings.xml also contains the following to redirect the folders to the NAS share. Not every plugin uses it but I opted to ignore the local caching of thumbnails for them.

 

  <pathsubstitution>
    <substitute>
      <from>special://profile/Thumbnails/Video/</from>
      <to>smb://NAS/xbmc/Thumbnails/Video/</to>
    </substitute>
    <substitute>
      <from>special://profile/Thumbnails/Music/</from>
      <to>smb://NAS/xbmc/Thumbnails/Music/</to>
    </substitute>
    <substitute>
      <from>special://profile/playlists/</from>
      <to>smb://NAS/xbmc/Playlists</to>
    </substitute>
    <substitute>
      <from>special://profile/addon_data/</from>
      <to>smb://NAS/xbmc/AddonData/</to>
    </substitute>
    <substitute>
      <from>special://profile/sources.xml</from>
      <to>smb://NAS/xbmc/Sources/</to>
    </substitute>
    <substitute>
      <from>special://profile/mediasources.xml</from>
      <to>smb://NAS/xbmc/MediaSources/</to>
    </substitute>
  </pathsubstitution>

  • 3 weeks later...

Anyone had a look at this thread: http://forum.xbmc.org/showthread.php?tid=132919

 

It's purpose is to build a headless XBMC install to run on your media server and update the local MYSQL db so you do not have to have a separate XBMC box updating the MYSQL db. Which I would assume most people in this thread would be interested in.

 

The thread is a little all over the place/hard to follow. But apparently the build instructions are here: http://forum.xbmc.org/showthread.php?tid=132919&pid=1182615#pid1182615

 

I have no idea how or what to do with that info and have no idea if this would even run on an unRAID build. But if someone smarter then me who is also interested wanted to take and look and report back..... It looks like it would fill in the final gap in having a complete server backend for XBMC. FYI, it does require Frodo, tho there looks to be an Eden patched version....

Anyone had a look at this thread: http://forum.xbmc.org/showthread.php?tid=132919

 

It's purpose is to build a headless XBMC install to run on your media server and update the local MYSQL db so you do not have to have a separate XBMC box updating the MYSQL db. Which I would assume most people in this thread would be interested in.

 

The thread is a little all over the place/hard to follow. But apparently the build instructions are here: http://forum.xbmc.org/showthread.php?tid=132919&pid=1182615#pid1182615

 

I have no idea how or what to do with that info and have no idea if this would even run on an unRAID build. But if someone smarter then me who is also interested wanted to take and look and report back..... It looks like it would fill in the final gap in having a complete server backend for XBMC. FYI, it does require Frodo, tho there looks to be an Eden patched version....

 

Thanks for the heads up. After seeing your post I decided to give this a try and got this working after some fiddling. So I decided to report back.

 

I basically installed a fresh minimal ubuntu on my esxi box in a vm. Installed the various packages / libraries needed to build xbmc, checked out the xbmc code, compiled, made a start script and added a cron job to get this all working. I wouldn't say it was the easiest thing to do - all the information is indeed in the post, just scattered around.

 

A couple of caveats; it's using alpha frodo code so you must ensure that both the server and your clients are using the same db version (MyVideos69, 70, ..). In my case I'm running MyVideos68 on my clients which is a little old, I believe they're at 72 now. And secondly someone in the thread discusses this, the http api has been deprecated in favor of jsonrpc, which means that sickbeard and various other servers may have not be updated to make db updates via jsonrpc. Both of these reasons meant that I had to checkout older code (from Sept) and compile from that point. It was a bit of a trial & error process.

 

Anyway, if anyone has questions and would like me to post a guide let me know.

All of what you said was very greek to me. I am going to set up the mysql version in unraid and see how that goes. I would like a guide that at least says what ESXI is. I'm guessing it is in my best interest to wait for Frodo to come out before playing with it. I ran Dharma (still am) on my main PC without any problems.

One heads up, there's a thread in the XBMC forums that mentions this feature as going away eventually and to be replaced with something else, possibly UPNP? Not clear to me and it's in another branch so I can't test it yet - I compile nightly on Linux.

 

Oh, ESX is virtualization software. Google can tell you volumes about it...

One heads up, there's a thread in the XBMC forums that mentions this feature as going away eventually and to be replaced with something else, possibly UPNP? Not clear to me and it's in another branch so I can't test it yet - I compile nightly on Linux.

 

Oh, ESX is virtualization software. Google can tell you volumes about it...

 

Yes, in frodo youwill be able to use upnp server on your xbmc machine, if your server is another machine than your xbmc machine and you want to use the upnp thing,your xbmc machine will have to be on too, next to your unraid machine and your second xbmc machine.

 

So in my opinion , upnp server on xbmc is worthless..

Im not going to turn on a third machine just so the library is shared..

Only thing left is mysql on unraid... That way i wont have to turn on 3 machines, but 2 will do.

One other option is use Plex Media Center as the back end and use the Plex Xbmc addon.

You get the centralized meta data and playstates with minimal effort. I like the xbmc front end more than Pex. Xbmc is much more responsive than Plex and there are tons of addons.

 

http://forums.plexapp.com/index.php/topic/27270-plexbmc-client-for-xbmc/

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.