Kodi Community Forum
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)



- charrua - 2010-05-08

jmarshall Wrote:Well, it isn't going to be fixed until it's reported or you fix it yourself by touching the code Smile
Are you saying that magic does NOT exist? Shocked

lestat1977uk Wrote:Charrua.
that worked, i think it was cause i had set a custom zoom. that was driving me nuts!
I thought it was to do with the resume and was about to try and clear resume settings, thanks mate you have saved me a lot of hassle.
You're welcome. That was also my first guess.

lestat1977uk Wrote:Should we report this then?
Definitely. Would you do the honors?


- RockDawg - 2010-05-09

OK. I finally got my thumbnails issue sorted out. I had to use this line to create the mount:

Code:
mount -t cifs -o file_mode=0777,dir_mode=0777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails

Now it works like a charm. No noticeable slowdown fetching them off the server!

EDIT: I should add that to get the above command to work, I had to first install smbfs:

Code:
sudo apt-get install smbfs (may be necessary to run apt-get update first)



- WisdomWolf - 2010-05-09

Well, the slowness seems to be isolated to my mac. When I connect from my wife's Windows 7 laptop everything works great. I've noticed that XBMC seems to lag in general though on the mac, so I'm wondering if its not just something weird with the latest builds. I mean, they are, afterall, not recommended. I'm going to give the skip name resolve tip a go to see if that does anything though.

UPDATE: All slowness is resolved, now I just have to figure out if I want to stick with Sugarsync or set up one of these other solutions. Suagrsync works, but it overwhelms the CPU on the revo so the symlink option may be a better choice.


- lestat1977uk - 2010-05-09

Charrua no worries will report it

Update:
Reported - http://trac.xbmc.org/ticket/9191


- mellowd - 2010-05-09

I'd like to do this at home.

Currently I have an Acer Revo connected via USB to a 1TB drive. I'm moving house at the end of the month so would like to change the setup.

I have a Synology NAS with 2TB's storage. The NAS can also run mysql which is managed through myphpadmin.

My plan is to get another Revo and connect it up the TV in the lounge. The second Revo will be connected to my TV in the bedroom. I would like both to use the NAS, both for storage and for the database (via mysql)


As a test I've installed xbmc on my PC and would like it to use a mysql database on the NAS. I've exported the database on the revo to an xml file, but having no luck getting that into mysql. Anyone have any advice on this part?

Thanks


- WisdomWolf - 2010-05-09

mellowd Wrote:I'd like to do this at home.

Currently I have an Acer Revo connected via USB to a 1TB drive. I'm moving house at the end of the month so would like to change the setup.

I have a Synology NAS with 2TB's storage. The NAS can also run mysql which is managed through myphpadmin.

My plan is to get another Revo and connect it up the TV in the lounge. The second Revo will be connected to my TV in the bedroom. I would like both to use the NAS, both for storage and for the database (via mysql)


As a test I've installed xbmc on my PC and would like it to use a mysql database on the NAS. I've exported the database on the revo to an xml file, but having no luck getting that into mysql. Anyone have any advice on this part?

Thanks

Once you have setup XBMC to use the MySQL server for the database then you can just import the xml in XBMC and it should automatically go to the MySQL server.


- WisdomWolf - 2010-05-10

Well, I thought I'd reached a centralized database nirvana, but I was wrong. I have two problems still. The first problem is that my wife's laptop ran a scan today and for some reason it duplicated everything in the library. I stopped it after it messed with three shows, but I'm still not sure why that happened in the first place.

The second problem is that I run XBMC on two laptops (my wife's Windows 7 laptop and my Macbook Pro). XBMC boots up and connect to the database just fine when at home, but there are times when I want to use XBMC on the go to watch media stored on the laptops themselves. I do this in file view and it doesn't need to go into any database, but now XBMC won't start when away from home because it can't find the MySQL server. Any suggestions?


- wstewart - 2010-05-10

WisdomWolf Wrote:I do this in file view and it doesn't need to go into any database, but now XBMC won't start when away from home because it can't find the MySQL server. Any suggestions?

Change your advancedsettings.xml when your on the road so that it will use a local database instead.

You could setup two batch files to start xbmc and copy the appropriate settings from say advancedsettings_onroad.xml or advancedsettings_athome.xml to advancedsettings.xml before starting xbmc.


- WisdomWolf - 2010-05-10

wstewart Wrote:Change your advancedsettings.xml when your on the road so that it will use a local database instead.

You could setup two batch files to start xbmc and copy the appropriate settings from say advancedsettings_onroad.xml or advancedsettings_athome.xml to advancedsettings.xml before starting xbmc.

I thought about something like that. It works for me, but I guarantee you that'll confuse my wife. There should be a way to set some kind of timeout so if it doesn't reach the MySQL database it still loads but it either falls back to local SQLite or disables the library feature for that session.


- mellowd - 2010-05-10

WisdomWolf Wrote:Once you have setup XBMC to use the MySQL server for the database then you can just import the xml in XBMC and it should automatically go to the MySQL server.

I've tried this and it's not quite working right. i.e. I've installed the latest svn win32 build on my main PC. I've edited the advancesettings.xml to include the reference to mysql:

Code:
<videodatabase>
  <type>mysql</type>
  <host>10.20.30.4</host>
  <name>xbmc</name>
  <user>root</user>
  <pass>xbmc</pass>
</videodatabase>

However, when I go into xbmc now and try to import, it's not showing me any .xml files even though I've browsed to the correct folder. Any ideas?


- mellowd - 2010-05-10

Actually, I managed to import. It seems you just have to be in the correct folder.

The problem is that it just created a local database again. There is nothing created on the mysql server itself Sad


- lestat1977uk - 2010-05-10

<videodatabase>
<type>mysql</type>
<host>10.20.30.4</host> - try localhost here
<name>xbmc</name>
<user>root</user> - use another user
<pass>xbmc</pass>
</videodatabase>

Have a look back at my posts and it should put you on the right track, i actually had to create the video db manually, again all explained in the posts between me and Charrua.

Also try creating another user, i had similar problems when creating my music db.

I will work just be patient, it's also pretty damn cool when it all comes together Smile


- lestat1977uk - 2010-05-10

WisdomWolf Wrote:I thought about something like that. It works for me, but I guarantee you that'll confuse my wife. There should be a way to set some kind of timeout so if it doesn't reach the MySQL database it still loads but it either falls back to local SQLite or disables the library feature for that session.

I have done similar things in the past, the way i did it was to take advantage of portable mode, ie have portable mode include the advanced settings and normal mode not use the advanced settings.

That way you can simple setup one shortcut with -p (portable) and one without, could even go as far to call them 'XBMC Home' and 'XBMC on the road'

Worked for me.


- mellowd - 2010-05-11

lestat1977uk Wrote:<videodatabase>
<type>mysql</type>
<host>10.20.30.4</host> - try localhost here
<name>xbmc</name>
<user>root</user> - use another user
<pass>xbmc</pass>
</videodatabase>

Have a look back at my posts and it should put you on the right track, i actually had to create the video db manually, again all explained in the posts between me and Charrua.

Also try creating another user, i had similar problems when creating my music db.

I will work just be patient, it's also pretty damn cool when it all comes together Smile


I've used another user. I've also created a new database manually and given full rights to the new user. The database is remote (on the NAS) so I can't use localhost.

For some reason xbmc is completely ignoring this setting in the .xml. I know this because I'm currently running wireshark to sniff for all traffic to the NAS and I see NO mysql traffic at all. i.e. xbmx is not even trying to connect to the NAs mysql database to begin with Sad

This is my current advancedsettings.xml file:

Code:
<videodatabase>
  <type>mysql</type>
  <host>10.20.30.4</host>
  <name>video</name>
  <user>videouser</user>
  <pass>testing</pass>
</videodatabase>



- harryzimm - 2010-05-11

Make sure you have the <advancedsettings> tag.
eg.

Code:
<advancedsettings>
   <videodatabase>
       <type>mysql</type>
       <host>10.20.30.4</host>
       <name>video</name>
       <user>videouser</user>
       <pass>testing</pass>
    </videodatabase>
</advancedsettings>

cheers