Sharing the XBMC database between macs?
#1
I was thinking about running XBMC on various macs around my house (lounge, bedroom, laptop etc).

Now ideally I wouldn't want to have to maintain XBMC on each (adding new films, watched flags etc etc).

Could I put the Library/Application Support/XBMC directory on my fileserver, and put symlinks to that on the various macs? If I left XBMC running on each of the macs would there be locking issues? Would watched flags show up on the others if I watched a movie, or would I have to quit then start XBMC on the others to pick up such changes?

Any thoughts welcome!

Justin
Reply
#2
I tried this recently and it didnt work out so well. I think one-day, this could be a nice feature to be able to share a db, but just symlinking files/dirs or something to that effect doesn't seem to work so well
Reply
#3
jayhawk785 Wrote:I tried this recently and it didnt work out so well. I think one-day, this could be a nice feature to be able to share a db, but just symlinking files/dirs or something to that effect doesn't seem to work so well

I have a Mac and an AppleTV and the only way I found was to export the complete library to a single file, move that file to the other location and import it from the other location. The only problem is that once you have imported it elsewhere, you have to remember to delete the original otherwise the next export won't work.

MacMini 2.3gHz i7, OS X 10.13.6
Running Kodi 18.9
Reply
#4
I think if the team ever do decide to do this then all that would be able to be shared would be the actual database. I suppose a sym link would work for just the database folder and store it somewhere accessible to all the computers.
Reply
#5
garyi Wrote:I think if the team ever do decide to do this then all that would be able to be shared would be the actual database. I suppose a sym link would work for just the database folder and store it somewhere accessible to all the computers.

That's what I tried, and it didnt work out. I use mine at the same time. I would imagine if you weren't writing/reading for the db concurrently it might work. But it seems like there are table lock issues or something that occurs and limits the ability to symlink the db.
Reply
#6
This quick and dirty solution is for my ubuntu boxes but it should work with mac and windows machines. I use unison to keep the databases in sync. Every minute a scheduled job calls the following command:

Code:
* * * * * unison -auto /home/minibob/.xbmc/userdata/Database ssh://mediabob@mediabob//home/mediabob/.xbmc/userdata/Database -batch >/dev/null 2>&1

As copying over fanart can take a while I only copy fanart every hour. I figure I can live an hour without pretty pictures but set this as you please:

Code:
* * * * * unison -auto /home/minibob/.xbmc/userdata/Thumbnails ssh://mediabob@mediabob//home/mediabob/.xbmc/userdata/Thumbnails -batch >/dev/null 2>&1

This keeps my two sets of xbmc databases and fanart in sync and you can use the same method to synchronise other aspects too (e.g. I do the same for favourites).

The examples I have given work for two instances of xbmc. You can use unison to keep more directories in sync though. See the unison manual for usage.

If you want to use this method I'd recommend backing up your database(s) before playing.

Pre requisites:

1. Your media directories are in the same location on each box. i.e. you'll need to mount to the same path on each box. The drive that holds my media is mounted to /media/Goods

2. You'll need to set up your ssh to use passwordless logins.

3. Ensure that each instance of xbmc is the same svn version same to avoid copying over invalid databases. I hosed my databases recently when I updated one version of xbmc but not the other.

Issues:

Last in first out. The database that has been updated last will overwrite the other.

This works for me as we only only use one xbmc instance at a time e.g. we move from using xbmc in the lounge to using xbmc in another room.

If you have two people using two seperate instances of xbmc at the same time then inevitably you will get conflicts. Things don't blow up, you will just have databases that haven't captured all changes across all xbmc instances.
Reply

Logout Mark Read Team Forum Stats Members Help
Sharing the XBMC database between macs?0