Easily Sync Multiple XBMC Machines to 1 Library
#31
Use hippojay's PleXBMC for an easy central library
Reply
#32
Ive got PMS on my server as is but not a big fan of it. Misses alot of movies and is slow as hell updating.
Reply
#33
wingzfan Wrote:I know this is an older thread but Im finally getting around to handling this since Ive added a few more HTPC's to the house.

Im setting up a DB based on the lifehacker tutorial in the first post. My question is this. MySQL db is stored on my windows server 2008 box and thats where all my files are stored. Those media drives share through my home network as an SMB. When doing the single db Im assuming I have to install XBMC on the server box and setup my library on that box then leave xbmc running on it? Then copy the created xml file to each of the other XBMC installs throughout the house?

Just trying to make this as smooth as possible.


With the MySQL method, you do not need to have XBMC installed on the server. You just install MySQL on your server and configure it per the instructions in the article, then create or add the appropriate lines to your advancedsettings.xml so that it will use the MySQL db on each XBMC machine you're running.
Reply
#34
RockDawg Wrote:With the MySQL method, you do not need to have XBMC installed on the server. You just install MySQL on your server and configure it per the instructions in the article, then create or add the appropriate lines to your advancedsettings.xml so that it will use the MySQL db on each XBMC machine you're running.


Ok so when I add the xml to say my living room xbmc it will build the library on the servers mySQL? I guess thats where Im getting lost is how the library gets into the sql db.
Reply
#35
Within XBMC, export your current library to .xml/.nfo. That option is under Settings>Video. Then once you switch to the new db, import from that file. You may want to include

<importwatchedstate>true</importwatchedstate>

in the advancedsettings.xml so that it will reatin your watched status for everything.
Reply
#36
as long as u make sure the advancedsettings.xml and sources.xml match up on all your XMBC instances.

i.e. you can't make your PC using E:\movies as a source if your ATV (for example) points at smb://192.168.0.1/movies

the sources.xml must have the same sources
QNAP TS670 NAS - 4x4TB Raided with NFS Support & Central MySQL DB
Pi 3 [Xbian] - Samsung 46" ES7000 Smart TV & HT-E5550 3D BD Sound System
Pi 3 [Xbian]  + Hyperion Ambilight- Samsung 48" Curved UE48JS9000 4k
PowerEthernet T1502 Powerline adapters
Reply
#37
Is there an option to force XBMC to not use its internal library, and keep all of its metadata alongside the media instead?

If not, there should be. It'd simplify things no end!
Reply
#38
Hyram Wrote:Is there an option to force XBMC to not use its internal library, and keep all of its metadata alongside the media instead?

If not, there should be. It'd simplify things no end!


+1

although, it would require write access to all media (some prefer to keep media shares read only)
Reply
#39
Hyram Wrote:Is there an option to force XBMC to not use its internal library, and keep all of its metadata alongside the media instead?

If not, there should be. It'd simplify things no end!

If I understand your question correctly, the answer is

Yes, you can.

You will not be able to save the library data to the media files themselves, but you can save that data to a file that will sit along side your media files and be recognizable by other media center softwares that are based on XBMC, like Plex or Boxee.

Note: Before doing this you should probably make sure you have all the info set the way you want it in XBMC library. You get out what you put in. (of course you can delete & adjust files that you don't like)

Open XBMC.
Go to Settings.
Select Video or Music
Select Library
Select Export Video (or Music) Library

At this point you are given a choice of separate or single file. Single file will create one single file for all media files' data. Separate will create a separate file for each media file, and name them similar to the media file name (I believe). I believe the separate files are also easier to go in and change if you wish too update their info.

Of course I don't believe there is a way to get XBMC to use these files as updatable library info. It can use these files to import a library. It will still run off of it's internal library, but it will reference these files before downloading info from the internet. I could be wrong, but that is my understanding of how it works.

Hope that helps.
Reply
#40
captaintater Wrote:Of course I don't believe there is a way to get XBMC to use these files as updatable library info. It can use these files to import a library. It will still run off of it's internal library, but it will reference these files before downloading info from the internet. I could be wrong, but that is my understanding of how it works.

Hope that helps.

You're wright. It will prefer local NFO files over internet information. This is the same for covers/artwork etc.. No it will not use those files as the primary library source. It will just import this info nto it's own library.
There are some 3rd party software which will do this for you. EMM-R (Ember, Windows Only) is one of them.
Store each of your movies in a seperate folder en place "<movie name>.nfo" there. If you update the nfo just refresh the movie in XBMC
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#41
Hyram Wrote:Is there an option to force XBMC to not use its internal library, and keep all of its metadata alongside the media instead?

If not, there should be. It'd simplify things no end!

It would slow down functionality though, as without an internal library you'd need to cycle and read through those files. Unless I've misunderstood your idea?
Reply
#42
No, you haven't misunderstood. I feel that with most rendering duties being shunted off to the GPU (meaning there is CPU clock-cycles to spare by the metric tonne) and the prevalence of gigabit ethernet in the home LAN, any performance hit incurred by reading metadata directly instead of a database would be negligible.
Reply
#43
Hyram Wrote:No, you haven't misunderstood. I feel that with most rendering duties being shunted off to the GPU (meaning there is CPU clock-cycles to spare by the metric tonne) and the prevalence of gigabit ethernet in the home LAN, any performance hit incurred by reading metadata directly instead of a database would be negligible.

And you'd be mistaken. There would be a noticeable lag in the loading of things. Sure, it would likely only be a second or two, but that's a long time to be waiting for info to show up.
Reply
#44
I too have tried to setup the SQL database method, and my lack of knowledge of Linux made me give up, the XBMC settings were trivial, but I had to rely on me setting up SQL on my Linux server, and I just wasn't devoted enough to solve my SQL issues to finish it.

Why can't XBMC continue to work the way it does, using the local *.db file, but have a setting that when turned on and pointed to a .xml file on a SMB share, it will compare it's local .db to the remote .xml, and then sync their content together. Obviously XBMC should make sure the remote file is not locked (in use by another XBMC) and if so cue the sync for later (each entry in the XML would need a timestamp for the changes made, so one XBMC doesn't undo the others). For that matter, the remote .xml could contain the path to where the remote thumbnail repository is located, and when the local database is syncing with it's remote .xml, it could pull/push the artwork too.

Having an non-local database is slow, so this seems like a "best of both worlds" solution, and makes each branch responsible for it's implementation. It would just be a new task that runs, after a reboot (after the initial "Update"), and before a proper shutdown (and maybe check to see if it's changed at various random times).
It would just require a share with read/write to put the .xml and artwork folder in from the end user, and two settings changes in the XBMC GUI. Hell I could even set it up if it was like that.

The way I imagine it is when a XBMC came online, it would have to scan the .xml for differences between it and it's local .db, then add the changes to it's local .db, then scan the media shares for changes, then update it's .db with those, then update the .xml to match.

Now because I have close to no programming experience, and no idea how the database updates work in XBMC, I'm sure there are about 50 reasons why this can't work.

Thanks for all the work you Devs do, I know enough to know that you guys are awesome.
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#45
Even just having it as an option in the interface somewhere where on a specific main XBMC machine you can enable a mode like "Library Sharing" as something you can enable similar to allowing remote controlling of XBMC and can enable that machine as the "Host" which controls the main library.

Then, you could have another option for the "Client" machines where you can just enter the IP (Or network name) of the Host machine for it to sync with.

Behind the scenes it can just sync up the database between the two.

What I was thinking of trying on my system was actually mounting the folders where the database is stored as an NFS share in linux (since I have Ubuntu machines, and XBMC Live is based off Ubuntu) and then just have other machines mount the same NFS shared folder.

Does anyone know the specifics of this and if it would work? Would I be able to just mount the library folder of my main Host machine on a Client machine? Does anyone know where this library folder would be?

I want to avoid doing all config since different machines would have different video and audio settings etc.
Mini-ITX HTPC: Zotac IONITX-A (GF9400), Mini-Box M350, 2x512MB DDR2-533, 160GB 2.5" HD, XBMC Live 10.1, 20W/30W (Idle/Max)
Media Server: 2x2GB DDR2-800, 6x2TB WD20EARS, FreeNAS 8.0.1-RC1
Reply

Logout Mark Read Team Forum Stats Members Help
Easily Sync Multiple XBMC Machines to 1 Library0