Can I share a library over multiple machines?
#1
Obviously I wouldn't be opening the application at the same time on multiple computers but I would like to share the library. When my loungeroom HTPC is off, if I watch an episode on my PC or laptop, it would be nice if they all tied in to the main library stored on the HTPC (on 24/7) gigabit network

How does one set the library location?
Reply
#2
You need to setup a mysql database on your server and then change the advancedsettings.xml and sources.xml on each of the clients

http://lifehacker.com/5634515/how-to-syn...-the-house
Reply
#3
Wow.
Couldn't I just install the app on my server (which is the same as my HTPC box) and edit the XML files to point to the always on machine?
Reply
#4
It's actually not that hard to do, I did it in about 20 mins and i'm no expert.

My guess is that xbmc does not come with any database server software and so there is no way to read the db over the network in the standard install.

FYI You must make sure that the sources on your htpc are network paths and not local paths for that machine.
Reply
#5
(2012-03-24, 11:12)ringsting Wrote: You need to setup a mysql database on your server and then change the advancedsettings.xml and sources.xml on each of the clients

http://lifehacker.com/5634515/how-to-syn...-the-house

Lifehacker article is outdated. Use this instead: HOW-TO:Sync multiple libraries (wiki)
Reply
#6
Man this is painfull.........

Ok long story short, I've got some issues getting this working.
I've installed mysqld community server on my PC, ver 5.5.22, I'm assuming 64bit is fine?
http://mysql.mirrors.ilisys.com.au/Downl...winx64.msi

I'm following the instructions linked in the post above me word for word.
"CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';"
"GRANT ALL ON *.* TO 'xbmc'; "
Sadly the mysql console tells me nothing indicating this has worked, I assume so.

I modified my advancedsettings XML file and I note XBMC did take a bit longer to open (but I take this as a good thing, it's assumedly working?)
I've even stopped the mysqld service in Windows and tried to open XBMC, it locks up and dies. Not an ideal error message, however again, this I assume is good as it's a clear indicator my text in the advanced settings file is correct.
Following so far?

Now is where the weird stuff happens.
I'm trying to do a blank, brand new database and build up from there.
I add a directory I know has a heap of stuff I know that XBMC should be more than capable of recognising.
It then (very quickly) says "

"Cleaning up library"
"Cleaning database"
"This may take some time"

The content type then gets reset to nothing (WTF?) Sad and I then re-edit the data, set it back to movie or TV etc and try again.
It will prompt:
"Change content"
"Do you want to refresh info for all items withinin this path"

and again, clean the DB but not actually go and update.

I can think of only 2 possible issues.
The instructions are incorrect for the new v11 build are incorrect or I'm not meant to be doing this on the 'main' primary XBMC PC?
Reply
#7
Update:
I have tried manually creating the databases (xbmc_video and xbmc_music) and adding the <name> line from Dharma version of XBMC, thinking it might help, this did not help.
I also tried renaming my advanced settings xml file, as soon as I did this, the updates started working again in XBMC - it was pulling data down once I re-opened the app and re-set the source content type to TV or movie.

I am lost, I hate to sound accusatory but I'm convinced the current mysql instructions simply do not work without 'fiddling' so I guess they aren't quite dummy proof (sorry guys)


Also, I can confirm I DO have a "myvideos60" and "mymusic18" database inside mysql which I did not create, so I can only assume XBMC is also capable of writing to the database.
Reply
#8
I have completely un-installed and re-installed the mysqld client over 10 times now. (which has it's own problems)
I've got it back on the computer, followed the guide word for word, nothing I can do will make this work except for disabling mysql mode.
I have even changed the ip from 192.168.0.16 to 127.0.0.1 even though it would connect fine before. This did not solve the issue.
I suspect if anyone actually gets a fresh PC with a fresh copy of XBMC and MySQL they also won't be able to get it going if they follow the guide word for word.

The new installer for mysql sounds ever so slightly different from the information provided in the guide.
In the interest of helping the developers with the guide, I will outline the install options in the newest 5.5.22 installer.

(Typical, Custom, Complete) on the setup type option. One would assume a typical would be fine?

When finished it will prompt you to launch the MySQL Instance configuration wizard (again, seems logical to do this)

Next is "MySQL Server Instance Configuration" and has the option of "Detailed Configuration" or "Standard Configuration"
(I will assume standard is the way to go, there's a significant amount of complex options in detailed plus the guide does mention to install standard)

>At this point is where it seems to deviate quite a bit from the regular guide.<
"Set the Windows Options"
"Install as Windows Service" (seems logical) - this is a tickbox.
Prompts for a service name, default is MySQL and tick box for "Launch the MySQL server automatically"
You can also "Include Bin Directory in Windows PATH" (I've tried with this on and off, it shouldn't really make a difference to my knowledge)

Finally the part I suspect I might be doing wrong.
"Please set the security options"
(Root password) 2 boxes to confim it and "Enable root access from remote machines"
Regardless I've tried with this "root access from remote machines" both on and off.
I've also been setting my root password as "xbmc" just for the sake of it, I have even tested re-installing with a different password incase having a user with the same name as the root account might cause some kind of security glitch.

Finally: "Create an anonymous account" I have also tried with this ticked on and off.


Let me clarify, I have tried EVERY POSSIBLE OPTION in the install of MySQL, I can clearly see the databases being created in the SQL console (show databasesWink it's also slower the first time you open it, when configured properly because it's creating said databases.
Regardless of this, nothing works, it will NOT remember any sources being set to a certain content type and when you set it to a content type and ask it to scan it simply stops.
Sorry for the long and ranting posts but there is simply nothing more for me to do with my level of knowledge, the guide will need some adjustment once we figure out what is broken. I look forward to some replies and thank you for your time.

EDIT: after all those hours, I deserve a break, I'm going to watch a movie,.... with VLC Sad
Reply
#9
Well, if it created the video60.db, it seems it connected and had access to create the tables. It might be that your issue was with scanning and not the MySQL part.

You should turn on debugging and post a log.
Reply
#10
Thank you for the response, I've seen a few historical posts where people seem pissed about logs being posted but I suppose they are relevant at this point.
I alt tabbed back in to XBMC, turned on logging - went over to my videos, set the content and watched it fail. Then quit - so it should be a nice short log.
(FWIW: I suspect scanning is 'fine' - because it works without the MySQL component being set) - so who knows, maybe someone smart can decipher.


(I attempted posting the full 34k log - too big, I've cut it to the section I believe the problem may be in)

23:11:27 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:28 T:3144 DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
23:11:28 T:3144 DEBUG: ------ Window Init (DialogContentSettings.xml) ------
23:11:28 T:3144 INFO: Loading skin file: DialogContentSettings.xml
23:11:30 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:32 T:3144 DEBUG: Previous line repeats 1 times.
23:11:32 T:3144 INFO: XCURL:Big GrinllLibCurlGlobal::CheckIdle - Closing session to http://feeds.feedburner.com (easy=001A2A08, multi=00AF78B8)
23:11:33 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:35 T:3144 DEBUG: Previous line repeats 1 times.
23:11:35 T:3144 DEBUG: ------ Window Deinit (DialogContentSettings.xml) ------
23:11:35 T:3144 DEBUG: Previous line repeats 1 times.
23:11:35 T:3144 INFO: Loading skin file: DialogYesNo.xml
23:11:35 T:3144 DEBUG: ------ Window Init (DialogYesNo.xml) ------
23:11:37 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:37 T:3144 DEBUG: ------ Window Deinit (DialogYesNo.xml) ------
23:11:37 T:3144 INFO: Loading skin file: DialogProgress.xml
23:11:37 T:3144 DEBUG: DialogProgress::StartModal called
23:11:37 T:3144 DEBUG: ------ Window Init (DialogProgress.xml) ------
23:11:37 T:3144 DEBUG: Mysql execute: update path set strContent = '', strScraper='', strHash='',strSettings='',useFolderNames=0,scanRecursive=0 where strPath like '%K:\\!sickbeard\\%'
23:11:37 T:3144 DEBUG: Mysql execute: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'K:\\!sickbeard\\','','')
23:11:37 T:3144 ERROR: SQL: Undefined MySQL error: Code (1062)
Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'K:\\!sickbeard\\','','')
23:11:37 T:3144 ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'K:\\!sickbeard\\','',''))
23:11:37 T:3144 DEBUG: ------ Window Init (DialogVideoScan.xml) ------
23:11:37 T:3144 INFO: Loading skin file: DialogVideoScan.xml
23:11:37 T:4836 DEBUG: Thread VIDEO::CVideoInfoScanner start, auto delete: 0
23:11:37 T:4836 NOTICE: VideoInfoScanner: Starting scan ..
23:11:37 T:4836 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00
23:11:37 T:4836 INFO: Video scan was stopped or finished ... restoring FindRemoteThumbs
23:11:37 T:4836 DEBUG: Thread VIDEO::CVideoInfoScanner 4836 terminating
23:11:37 T:3144 DEBUG: CGUIMediaWindow::GetDirectory (sources://video/)
23:11:37 T:3144 DEBUG: ParentPath = [sources://video/]
23:11:37 T:3164 DEBUG: Thread Background Loader start, auto delete: 0
23:11:37 T:3164 DEBUG: Thread Background Loader 3164 terminating
23:11:37 T:3144 DEBUG: ------ Window Deinit (DialogVideoScan.xml) ------
23:11:38 T:3144 DEBUG: ------ Window Deinit (DialogProgress.xml) ------
23:11:41 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:41 T:3144 DEBUG: CGUIMediaWindow::GetDirectory ()
23:11:41 T:3144 DEBUG: ParentPath = []
23:11:41 T:5688 DEBUG: Thread Background Loader start, auto delete: 0
23:11:41 T:5688 DEBUG: Thread Background Loader 5688 terminating
23:11:42 T:3144 DEBUG: SDLKeyboard: scancode: 01, sym: 001b, unicode: 001b, modifier: 0
23:11:42 T:3144 DEBUG: CApplication::OnKey: escape (f01b) pressed, action is PreviousMenu
23:11:42 T:3144 DEBUG: CGUIWindowManager:TonguereviousWindow: Deactivate
23:11:42 T:3144 DEBUG: ------ Window Deinit (Pointer.xml) ------
23:11:42 T:3144 DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
23:11:42 T:3144 DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new
23:11:42 T:3144 DEBUG: ------ Window Init (Home.xml) ------
23:11:42 T:3144 INFO: Loading skin file: Home.xml
23:11:42 T:1492 DEBUG: CRecentlyAddedJob::UpdateMusic() - Running RecentlyAdded home screen update
23:11:42 T:3144 DEBUG: ------ Window Init (Pointer.xml) ------
23:11:42 T:1492 DEBUG: GetRecentlyAddedAlbumSongs() query: SELECT songview.* FROM (SELECT idAlbum FROM albumview ORDER BY idAlbum DESC LIMIT 10) AS recentalbums JOIN songview ON songview.idAlbum=recentalbums.idAlbum
23:11:42 T:1492 DEBUG: CMusicDatabase::GetRecentlyAddedAlbums query: select * from albumview order by idAlbum desc limit 10
23:11:42 T:1492 DEBUG: CRecentlyAddedJob::UpdateVideos() - Running RecentlyAdded home screen update
23:11:42 T:1492 DEBUG: CVideoDatabase::RunQuery took 1 ms for 0 items query: select * from movieview order by idMovie desc limit 10
23:11:42 T:1492 DEBUG: CVideoDatabase::RunQuery took 1 ms for 0 items query: select * from episodeview order by idEpisode desc limit 10
23:11:42 T:1492 DEBUG: CVideoDatabase::GetMusicVideosByWhere query = select * from musicvideoview order by idMVideo desc limit 10
23:11:42 T:1492 DEBUG: CVideoDatabase::GetMusicVideosByWhere time for actual SQL query = 2
23:11:42 T:1492 DEBUG: CRecentlyAddedJob::UpdateTotal() - Running RecentlyAdded home screen update
23:11:44 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:44 T:3144 DEBUG: CApplication::ExecuteXBMCAction : Translating ActivateWindow(ShutdownMenu)
23:11:44 T:3144 DEBUG: CApplication::ExecuteXBMCAction : To ActivateWindow(ShutdownMenu)
23:11:44 T:3144 DEBUG: Activating window ID: 10111
23:11:44 T:3144 DEBUG: ------ Window Init (DialogButtonMenu.xml) ------
23:11:44 T:3144 INFO: Loading skin file: DialogButtonMenu.xml
23:11:44 T:3144 DEBUG: CApplication::ExecuteXBMCAction : Translating down
23:11:44 T:3144 DEBUG: CApplication::ExecuteXBMCAction : To down
23:11:46 T:3144 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
23:11:46 T:3144 DEBUG: CApplication::ExecuteXBMCAction : Translating XBMC.Quit()
23:11:46 T:3144 DEBUG: CApplication::ExecuteXBMCAction : To XBMC.Quit()
23:11:46 T:3144 DEBUG: CAnnouncementManager - Announcement: OnQuit from xbmc
23:11:46 T:3144 DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnQuit
23:11:46 T:732 DEBUG: Thread Jobworker 732 terminating (autodelete)
Reply
#11
You need to use SMB or NFS shares, not windows drive shares, or drives mounted as letters in Windows.
Reply
#12
That's a shame as I made a point of always mapping the drives on each workstation the same (k:\ on all boxes) - regardless I shall try that now, thanks.
It appears the solution is found, clearly my fault for assuming it might let me get by using identical drive letters.
Appreciate the response, hope this helps others when google indexes it Smile
Reply
#13
I'd like to thank all of you guys for not being asses to a newbie, it's really appreciated. I haven't edited source files for XBMC for about 5 years (RIP my Xbox, truly a hero)

I'm going to paste an entire copy of my advancedsettings.xml file for others to copy and modify (only password changed)
Hopefully this will help others to simply copy this file and edit it. I've re-directed everything possible so that opening XBMC on my desktop is identical to opening it in the loungeroom on my little HP Microserver.
The best part of this file is that I can run it even locally on the main server - so the same config file works on all PC's


<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.0.16</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.0.16</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/Thumbnails</to>
</substitute>
<substitute>
<from>special://masterprofile/playlists/</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/playlists/</to>
</substitute>
<substitute>
<from>special://masterprofile/addon_data/</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/addon_data/</to>
</substitute>
<substitute>
<from>special://masterprofile/keymaps/</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/keymaps/</to>
</substitute>
<substitute>
<from>special://masterprofile/sources.xml</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/sources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/mediasources.xml</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/mediasources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/RssFeeds.xml</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/RssFeeds.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>SMB://scott:[email protected]/C$/Users/scott/AppData/Roaming/XBMC/userdata/favourites.xml</to>
</substitute>
</pathsubstitution>
</advancedsettings>



Thank you all again, this is working just fantastic - <3
(Note: might be worth putting a small disclaimer in the guide saying)
"NOTE: even mapped samba shares with an identical drive letter will not suffice, the path must be an SMB:// style attachment to the date"

Have a good day
Reply
#14
Post debug logs to pastebin.com and then link them here
Reply

Logout Mark Read Team Forum Stats Members Help
Can I share a library over multiple machines?0