2 XBMC PCs and 1 Database on the shared NAS - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59) +---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603) |
- colbert - 2011-01-10 charrua Wrote:There is a new feature already implemented in XBMC(since svn r28142) that lets you use a central MySQL database for all your clients. Hi there, linux user here (Arch distro) and I did not have an advancedsettings.xml file in my ~/.xbmc/userdata folder, so I created one and pasted the first part you displayed for video database. I changed the localhost to 192.168.1.101 which has MySQL all set and running xbmc 24/7. Now that file is there, what else needs to be done or is that all? I am looking to keep my laptop and desktop in sync, so now with it setup on the desktop, I just pop the advancedsettings.xml on my laptop as well, referencing 192.168.1.101 where the MySQL is running? - zosky - 2011-01-10 colbert Wrote:Hi there, linux user here (Arch distro) and I did not have an advancedsettings.xml file in my ~/.xbmc/userdata folder, so I created one and pasted the first part you displayed for video database. I changed the localhost to 192.168.1.101 which has MySQL all set and running xbmc 24/7. your advancedsettings.xml needs start with <advancedsettings> and end with </advancedsettings> (sorry, that may be too obvious) the other thing you need to do is deal with tumbnail cache (fanArt/movie cover/TV banners...) found in ~/.xbmc/userdata/Thumnails. i use rSync in both directions w/ cronTab Code: ## local to livingRoom - colbert - 2011-01-10 zosky Wrote:your advancedsettings.xml needs start with <advancedsettings> and end with </advancedsettings> (sorry, that may be too obvious) Haha, indeed it is not! I forgot to do that :o zosky Wrote:the other thing you need to do is deal with tumbnail cache (fanArt/movie cover/TV banners...) found in ~/.xbmc/userdata/Thumnails. i use rSync in both directions w/ cronTab Hmm, before visiting this thread to start the MySQL going, I had added the movie+tv sources on my laptop and completed the content scan, all art/thumbs are there. Do I still need to do this? I'm wondering if when I update the library on the laptop, it will download the necessary art as normal and I just continue to do that? - zosky - 2011-01-10 colbert Wrote:Haha, indeed it is not! I forgot to do that :o you're laptop now has a local.db (~/.xbmc/userdata/Database/MyVideos34.db) which contains all the MetaData (title/air-date/actors...) the cache is based on each entries $PATH/$File.name ... so *IF* the (sources &) paths are the same in your laptop's local DB & your localhost (mySQL.db), then yes, its fine. otherwise you will need to blow away the laptop's cache & copy over from localhost. thats the 1st part (setup), then comes maintenance... if you scan for new content on 1 box, the meta-data will be added to the (mySQL) db, but the thumbnails will only exist on that box... hence my rSync solution. hope that clarifies - colbert - 2011-01-10 zosky Wrote:you're laptop now has a local.db (~/.xbmc/userdata/Database/MyVideos34.db) which contains all the MetaData (title/air-date/actors...) Gotcha, that makes sense. I have oodles of rsync scripts as it is so that *should* be okay when I get there hehe... So I'm having some errors here just running XBMC (from xbmc.log): Code: 16:40:15 T:3022292864 M:2263351296 ERROR: Unable to open database at host: 192.168.1.101 db: xbmc_video (old version?) Here is my ~/.xbmc/userdata/advancedsettings.xml: Code: <advancedsettings> I have the MySQL daemon running fine, but am such a noob to MySQL that I must be missing something obvious lol. - zosky - 2011-01-11 colbert Wrote:So I'm having some errors here just running XBMC (from xbmc.log): im convinced being proficient at mySQL needs black-magic or selling your fist born to the devil. luckly, im not half bad with google & its all still fresh in my mind as i only set this up a week ago... i hope this helps. YMMV.
cheers ~z - colbert - 2011-01-11 Thanks a bunch! After quite some fudging and googling myself I was able to get it working alas by commenting out "skip-networking" and I didn't have a bind-address line to begin with, and read that it needed to be commented out so I added it and then commented it out, and followed this: http://www.debuntu.org/how-to-create-a-mysql-database-and-set-privileges-to-a-user getting the database and user setup. So no more errors in the xbmc.log about being able to access the database, it's clearly seeing and using it, but now when running XBMC I'm getting this when trying to Scan for New content: Code: 18:35:17 T:2848979824 M:2400669696 ERROR: AddLinkToActor failed In MySQL, the tables for the xbmc_video database show: Code: mysql> show tables; So something is up here, it appears the necessary tables aren't all there, and I'm quite weary of doing it myself lol. zosky Wrote:im convinced being proficient at mySQL needs black-magic or selling your fist born to the devil. Giddy up to that lol - zosky - 2011-01-11 yeah, that definitely doesn't look right. here's what mine looks like Code: mysql> show tables in xbmcvid ; - ti_gusus - 2011-01-11 zosky Wrote: Accessing the QNAP from Ubuntu is fairly easy. http://mytekstuff.blogspot.com/2008/12/accessing-qnap-from-ubuntu-is-fairly.html First install "smbfs": - sudo apt-get install smbfs Then it's just a matter of creating the relevant directories in /mnt sudo mkdir /mnt/Thumbnails ...and then editing /etc/fstab sudo nano /etc/fstab //192.168.1.108/Public/Video/Thumbnails /mnt/Thumbnails cifs directio,iocharset=utf8,noacl,noperm,nosetuids,rw To mount: sudo mount -a simLink your cache folder ... ln -s /mnt/Thumbnails /home/htpc/.xbmc/userdata/Thumbnails Now my problem , Each time I need to reboot, the shortcut is not created. Have to "Mount -a" each time What wrong ?? This is the last item on my list to get it work at 100% Please help. Thank - ti_gusus - 2011-01-11 Anyone ? Now my problem , Each time I need to reboot, the shortcut is not created. Have to "Mount -a" each time What wrong ?? This is the last item on my list to get it work at 100% Please help. Thank - RockDawg - 2011-01-11 ti_gusus Wrote:Anyone ? I'm no expert on things Linux but I did something similar to what you did. Make sure smbfs is installed and then I just added the following line to /etc/fstab (obviously adjust the paths to what yours are): Code: //192.168.1.20/disk7/xbmc_thumbs/Thumbnails /home/kevin/.xbmc/userdata/Thumbnails cifs credentials=/home/kevin/.credentials,_netdev,file_mode=0777,dir_mode=0777 0 0 /home/kevin/.credentials is a file I created with the username and password for the network share where my thumbs are. You can probably eliminate that if yours doesn't require a username or password. The file contents goes like: Code: username=yourusername I don't remember exactly what they do, but I remember that the "file_mode=0777,dir_mode=0777" portion was critical to getting it to work for me. That entry in /etc/fstab is what recreates the mount on each boot. Like I said, just make sure you already have smbfs installed. After that it worked great for me. Good luck! - zosky - 2011-01-11 You are missing 2numbers at the end of the line. Something like 0 0. One tells the system to mount it on boot, the other is to indicate if it should be checked for errors. Don't just put 0 0 at the end. Google fstab and find the proper description. - RockDawg - 2011-01-11 Yah, I missed that in his post. You can see the two zeroes at the end on the line I posted. Although according to wikipedia it doesn't have anything to do with mount on boot. It says the first number is "dump-freq" and the second is "pass-num" and here is what it says about them: Quote:dump-freq adjusts the archiving schedule for the partition (used by dump). - zosky - 2011-01-11 oi, ooops. sorry. its not the 2 numbers. its the options string before that... it needs to include auto (ie auto-mount) directio,iocharset=utf8,noacl,noperm,nosetuids,rw,auto - RockDawg - 2011-01-11 zosky - Please don't take me the wrong way. I'm not setting out to correct you. I don't know much about Linux and it was quite a while ago when I was going through this myself and haven't had to touch it since so I forgot most of it. This post just seemed like a good reason to refresh myself on it while trying to help out ti_gusus. Anyway, according to what I read, auto is the default mount option so it doesn't need to be specified. As you can see in the fstab entry I posted earlier, it doesn't include the auto option and it auto mounts on every boot. |