Kodi Community Forum
Ability to share and synchronize XBMC userdata profiles between multiple machines - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Ability to share and synchronize XBMC userdata profiles between multiple machines (/showthread.php?tid=15971)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21


- charrua - 2010-03-22

RckStr Wrote:Im trying to set this up now but im a little confused regarding the patches and how to apply them. Can someone please elaborate? Or is there a Pre-patched svn availiable yet?

You can download a DMG file from here (choose the latest):
http://mirrors.xbmc.org/nightlies/osx/


- RckStr - 2010-03-24

Thanks alot, you have been of great help.

I have now set up MySQL on my windows box (running as service standard install not advanced), installed the xbmc version you linked to and edited the advancedsettings.xml

As expected, the library is gone (im guessing its looking to the windows box for it)

Is there any way of exporting the existing library onto the MySQL one or will rescraping be needed?

I did try rescraping my TVshows and what I find is that XBMC becomes very sluggish when browsing them, a little box comes up in the downright corner of the screen, saying "working" almost every time I "change directory"

When using symlinks, I find XBMC much faster. Any way of dealing with this?


- charrua - 2010-03-24

RckStr Wrote:Thanks alot, you have been of great help.
You're welcome.
RckStr Wrote:I have now set up MySQL on my windows box (running as service standard install not advanced), installed the xbmc version you linked to and edited the advancedsettings.xml
As expected, the library is gone (im guessing its looking to the windows box for it)
Remember that the old database is not really gone, it's still there in the userdata/database folder of your XBMC path. So if for some reason you need it back, just delete the lines you've added to the advancedsettings.xml and XBMC will load it instead of the central (MySQL) db. That is true for the video and also for the music dbs.
RckStr Wrote:Is there any way of exporting the existing library onto the MySQL one or will rescraping be needed?
You can export the library from XBMC (settings>video>library>export video database-->only one file-->export thumbs and fanart) while still using the local (SQLite) database, and then import everything back from XBMC after making the change to the central (MySQL) database. That way you'll keep even the watched/unwatched info. The import process could take a while though (depending on the size of your library).
RckStr Wrote:I did try rescraping my TVshows and what I find is that XBMC becomes very sluggish when browsing them, a little box comes up in the downright corner of the screen, saying "working" almost every time I "change directory"
When using symlinks, I find XBMC much faster. Any way of dealing with this?
Regarding browsing speed using the central db, at least in my case, it's only a bit slower than using the local db. It's reasonable because MySQL db is remote and also natively slower than SQLite, but the advantages for the trade on speed are concurrency (simultaneous connections to the database) and native network connectivity.

Anyway if after importing all the data from the old db, you still have a very sluggish response from XBMC GUI, try enabling the debug mode and looking at the log to see if something unusual is happening and causing the problem. Alternatively you can post the log in the original thread of the feature posted before and ask for troubleshooting help.


- pyite - 2010-03-24

epic. each day i love xbmc more and more.

i just set this thing up a few weeks ago, and have accomplished so much, yet i know i am just at the tip of the iceberg.

thanks so much


- RckStr - 2010-03-24

charrua Wrote:You can export the library from XBMC (settings>video>library>export video database-->only one file-->export thumbs and fanart) while still using the local (SQLite) database, and then import everything back from XBMC after making the change to the central (MySQL) database. That way you'll keep even the watched/unwatched info. The import process could take a while though (depending on the size of your library).

Thats awesome. I did not think of that. Its GREAT not having to rescrape SmileSmileSmile
charrua Wrote:Regarding browsing speed using the central db, at least in my case, it's only a bit slower than using the local db. It's reasonable because MySQL db is remote and also natively slower than SQLite, but the advantages for the trade on speed are concurrency (simultaneous connections to the database) and native network connectivity.

Anyway if after importing all the data from the old db, you still have a very sluggish response from XBMC GUI, try enabling the debug mode and looking at the log to see if something unusual is happening and causing the problem. Alternatively you can post the log in the original thread of the feature posted before and ask for troubleshooting help.

Here its alot more sluggish now, but truth be told, i was playing with it mostly while scraping, which probably takes its toll both on xbmc aswell as MySQL, so im gonna try what you said and play with it after all my data is imported and see what results I get then.

One last thing. When setting up the rest of my Macs against this db, should I use separate MySQL logins with each or should I just duplicate the "advancedsettings.xml" that I allready created? Will MySQL accept several concurrent logins from the same user?

Thanks again for your help. You have made something that at first seemed VERY tecnical become comprehensive.


- charrua - 2010-03-24

RckStr Wrote:One last thing. When setting up the rest of my Macs against this db, should I use separate MySQL logins with each or should I just duplicate the "advancedsettings.xml" that I allready created? Will MySQL accept several concurrent logins from the same user?
MySQL will accept both options, so just for simplicity's sake I would go with the same user/pass for all the XBMC instances. As for concurrency, MySQL server can be configured (at install time or later) to accept a certain number of simultaneous connections, if you installed it with default options I think that number is set to 15.
RckStr Wrote:Thanks again for your help. You have made something that at first seemed VERY tecnical become comprehensive.
Good to read that. I'm glad could help.


- RckStr - 2010-03-24

Allright, Ive got everything up and running now. This is a killer feature imo. Really sets XBMC apart from Plex and the rest of the competition. Whats bothering me though is how sluggish XBMC becomes using this. It takes about 20 seconds from i push the remote until the movie library opens. The same goes for the TV library.

Im guessing there must be some tweaks I can do to MySQL to improve this. Im on gigabit lan and the computer running the SQL server is a Quad Core 3 GHZ with 8 gigs memory on Vista 64, so clearly the hardware shouldnt be a limitation. As for network, Im on gigabit and ive shared the library over network before using symlinks, and that hardly caused a delay at all.

Anyone here with similar situations whos found a sollution?


- charrua - 2010-03-24

RckStr Wrote:Allright, Ive got everything up and running now. This is a killer feature imo. Really sets XBMC apart from Plex and the rest of the competition. Whats bothering me though is how sluggish XBMC becomes using this. It takes about 20 seconds from i push the remote until the movie library opens. The same goes for the TV library.
Im guessing there must be some tweaks I can do to MySQL to improve this. Im on gigabit lan and the computer running the SQL server is a Quad Core 3 GHZ with 8 gigs memory on Vista 64, so clearly the hardware shouldnt be a limitation. As for network, Im on gigabit and ive shared the library over network before using symlinks, and that hardly caused a delay at all.
Anyone here with similar situations whos found a sollution?

I have almost 2000 movies in my library, plus more than 3500 tv show episodes, plus more than 2000 musicvideos. XBMC takes only a couple of seconds to load the movie library (similar time for tv shows and a bit more for musicvideos) it is a little slower than using the local db, but not too much. Probably you have a particular problem that is causing the sluggishness you describe. As suggested before set XBMC in debug mode and analize the log or post it in the forum for others to analize and try to find the cause of the problem.


- spiderlane - 2010-03-25

@RckStr - might be worth trying using an IP address for your MySQL server if you're using a name (just to rule out any DNS/name resolution issues)

I set this up with 2 machines (both OSX) and it's pretty well - certainly very easy to setup. Slightly slower than with the local DB but not enough to bother me and certainly not in the region of 20 seconds.

The only thing which doesn't seem to be working is that on the 2nd machine (i.e. not the one I scraped the library on), all the movies/tvshows/music are in the library, but none of the thumbnails, fanart, covers or posters are there. I assume this is because they're on remote servers (TVDB and the like) but are not cached onto that XBMC install - is there any way to populate that cache on other machines? (or is there some other solution)

Thanks
Mark


- charrua - 2010-03-25

spiderlane Wrote:The only thing which doesn't seem to be working is that on the 2nd machine (i.e. not the one I scraped the library on), all the movies/tvshows/music are in the library, but none of the thumbnails, fanart, covers or posters are there. I assume this is because they're on remote servers (TVDB and the like) but are not cached onto that XBMC install - is there any way to populate that cache on other machines? (or is there some other solution)

Thanks
Mark

From other thread:
charrua Wrote:
bradvido88 Wrote:I'm using this solution and it is pretty great. The thing that will make it kick@$$ is when the thumbs/fanart gets rolled into it.
Current i still have to do a manual update on all my XBMC instances in order to keep fanart updated in all.
There are two alternative methods for that right now:

a-Copy the thumbnails folder from the XBMC where you scraped the media files and paste it into the XBMC userdata folder of the other XBMC clients.

b-After scraping new media files, in the other instances of XBMC (not the one that scraped the files) go and browse the new files in file-view (instead of library-view).



- spiderlane - 2010-03-25

charrua Wrote:There are two alternative methods for that right now

Great - thanks for the tips Smile

ETA - The copying of the thumbnail folder works a treat - I think I'll use one machine as the "master scraper" and rsync the thumbnails to the other machines every few hours.


- RckStr - 2010-03-26

Thx for the tip. I do use an ip adress as of now but I do have two other macs Ill set up soon and c if they behave any different. And ill log what happends.


- charrua - 2010-03-26

spiderlane Wrote:Great - thanks for the tips Smile

ETA - The copying of the thumbnail folder works a treat - I think I'll use one machine as the "master scraper" and rsync the thumbnails to the other machines every few hours.

Great! Another option suggested by MrDVD in another thread is to replace the local thumbnails folder of each XBMC client by a hard link to a shared folder in the server. That way you won't even have to rsync all the folders. The only cons that I find in his solution are:
1- A lack on speed accesing the networked image cache (anyway be aware that two people reported that the lack of speed is none in their tests while I observed a noticeable slowdown in XBMC screen openings)
2- If you loose connection to the networked shared folder XBMC won't show any posters or fanart.

See this thread for more details.


- XBL. - 2010-04-03

This sounds like a great setup! Currently I don't have access to my XBMC setups, but I'm wondering if anyone has tried the following.

1. Running a server (headless) which has the media and a MySQL database.
2. Updating the database on the server itself (using XBMC, started through SSH, with or without a GUI - or maybe using some other piece of software?).
3. Accessing the files both through NFS and samba (I have an Xbox in the bedroom and a HD-capable media center in the livingroom).

(1) is no problem, since that's basically the setup we're talking about in this topic. But about (2) and (3) I'm unsure.

Regarding (2): would XBMC care about the lack of a connected monitor and the lack of all the drivers? And would it be possible to configure XBMC without the GUI and starting it through SSH? It's a bit of an overkill to run a complete XBMC setup for just updating the database, but as far as I've read there are no plans to create something to update the database without a full XBMC install.

Regarding (3): I'm not sure how the filepaths are stored in the database. Using NFS I can replicate the directory structure, so I assume that will work without any problems. But using samba from within XBMC, it's a bit different (and afaik you can't mount samba or NFS on the Xbox without using XBMC itself).

Sorry for kindof hijacking this topic, but I think it's related enough to be worth it Wink.


- charrua - 2010-04-03

XBL. Wrote:3. Accessing the files both through NFS and samba (I have an Xbox in the bedroom and a HD-capable media center in the livingroom).
Regarding (3): I'm not sure how the filepaths are stored in the database. Using NFS I can replicate the directory structure, so I assume that will work without any problems. But using samba from within XBMC, it's a bit different (and afaik you can't mount samba or NFS on the Xbox without using XBMC itself).
I'm afraid the problem is deeper than that when it comes to XBOX, because the MySQL feature hasn't been ported to that branch, and according to the developers it never will. But it is implemented for windows, osx and linux so far, and it's been reported to work on the three platforms without much problems. There was a bug that affected storage of local paths under Windows environments, but it was recently fixed by firnsy (the developer this feature), see ticket #9022 for more info.