Kodi Community Forum
MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - 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: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library (/showthread.php?tid=85654)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29


- Ned Scott - 2011-11-29

You re-import the library. Re-adding the folders/sources in itself won't add them to the library, but they're also not required since the library data has network file path saved in the library data. You likely want to do both, though, so when you have something new you can update the library from that machine.

Watched flags would be saved, but I think there is a way to reset that. At the very least you can make a second profile that uses the same library, but has its own watched data.


- cyberwizzard - 2011-11-29

The trick is that the library export contains the path to the file and whether is watched (at least I think all my watched information was preserved, check the XML content). So yes, using the same paths you can simply import it again and all is well.

But when you switch to smb, the paths change and XBMC cannot see which file correlated between your local paths and network paths.

So open the file and replace all paths in the XML with the network equivelent. In my case, I used one share for all my media so I only needed a single search-and-replace-all.

When done, save the file. Add the share to XBMC ("Add media") and import the library.


- logpace - 2011-11-29

cyberwizzard Wrote:The trick is that the library export contains the path to the file and whether is watched (at least I think all my watched information was preserved, check the XML content). So yes, using the same paths you can simply import it again and all is well.

But when you switch to smb, the paths change and XBMC cannot see which file correlated between your local paths and network paths.

So open the file and replace all paths in the XML with the network equivelent. In my case, I used one share for all my media so I only needed a single search-and-replace-all.

When done, save the file. Add the share to XBMC ("Add media") and import the library.

And of course I need to change every \ to a / too? awesome...

So when I import and then add the sources since I do want to update from this machine, how do i get rid of the duplicates?


- pellinore - 2011-12-10

My sql server is very slow on song changes, I added the indexing as the front page and was wondering if I did it right. I have "Query OK, 0 rows affected", on the front page he has 2154 rows affected. I get no error messages.

mysql> CREATE INDEX test_idx ON song(idAlbum);
Query OK, 21514 rows affected (1.50 sec)
Records: 21514 Duplicates: 0 Warnings: 0


- sebak - 2011-12-29

Hello,

I find that my music database (around 3000 artists and 25000 tracks) navigates pretty slow with the standard sqllite database. Would I see better performance with a local MySQL (of course with adding the required indexes stated in this thread)?

Thanks


- feppa - 2012-01-01

Hi!
Does anyone else have trouble to get stopped/paused movies/tv-shows to resume at last point if you havent finished it? I´m using XBMC Eden beta 1. It do not work with resume on same computer either.

Sorry for my bad english.


- travisbell - 2012-01-01

feppa Wrote:Does anyone else have trouble to get stopped/paused movies/tv-shows to resume at last point if you havent finished it? I´m using XBMC Eden beta 1. It do not work with resume on same computer either.

I don’t think this has anything to do with the MySQL library per-say but I’ll mention something I noticed. I found that after upgrading to Eden the default action for playing videos had changed. You can find this setting under Settings → Video → File lists → Default select action.

By default it seems this is set to “Play” where you want it to be “Choose”. This will prompt you to resume videos.


- melagodo - 2012-01-03

I've guys.
I've set up 2 clients:

1) main pc
2) atv2.

MySql server is running on a Nas.

My files are stored on the NAS, and folder structure is
\Movies\
—-\MovieTitle\
—— MovieTitle.avi
—— MovieTitle.tbn
—— MovieTitle-fanart.jpg
—— MovieTitle.nfo

I've set up mysql, added movie source on main pc and scanned it :this correctly populated the DB.

I've started a fresh copy of xbmc on the atv2 with advancedsettings.xml properly edited: I can now see all of my movies (without adding any source!)

Two questions:
1) why If I add the same movie source on atv2 every title entry gets duplicated? I mean, I guess I should add it if I want it to get updated...

2) is there any way for all of the clients to download a local copy of thumbnails and fanart locally? (since actually I can't see thumbnails on atv2, only fanarts..)

Thank you very much
melagodo

ps: i'm using Eden beta1 on both clients!


- melagodo - 2012-01-03

Solved with this!
http://forum.xbmc.org/showpost.php?p=751029&postcount=97

melagodo


- melagodo - 2012-01-03

Another problem...
If I play a movie on client A and stop it, client B doesn't ask me to resume it. Also, if I set a movie as watched, the other client doesn't see it as watched.
Basically...nothing I'm using sql because of is working Sad


Here's log.
http://pastebin.com/NySqxKfy

Any hints?


- michaelstone - 2012-01-08

im hoping someone knows whats going wrong for me...i had this working fine when everything was from smb, but it didnt play nice with atv2s, constant buffering and crashes...so i set up nfs server and now everything streams perfect but the mysql library part isnt working...if i have the advancedsettings.xml, xbmc crashes, without it runs but without centralized library clearly...

heres my settings maybe someone can see something ive done wrong:

Quote:<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>smb://*******/Users/Stone/AppData/Roaming/XBMC/userdata/Thumbnails</to>
</substitute>
</pathsubstitution>
</advancedsettings>



- Ned Scott - 2012-01-09

michaelstone Wrote:im hoping someone knows whats going wrong for me...i had this working fine when everything was from smb, but it didnt play nice with atv2s, constant buffering and crashes...so i set up nfs server and now everything streams perfect but the mysql library part isnt working...if i have the advancedsettings.xml, xbmc crashes, without it runs but without centralized library clearly...

You will have to explain a little bit more when you say it's "not working"

What version of XBMC are you using on the Windows machine?


- michaelstone - 2012-01-09

im running the dec 24th release on pc, laptop, and the 2 atv2s...with the advancedsettings.xml posted above everything worked fine when using smb...everything sync'd perfectly, but now that ive switched to nfs the same xml causes xbmc to crash on boot on all devices...if i edit it to say <host>nfs://192.168.***.***</host> instead it doesnt crash anymore but shows nothing in library...


- draven187 - 2012-01-11

I also had the problem with a slow working XMBC on a W7 machine and a ATV1 with crystalbuntu.

Fixed it by using mysql 5.1 instead of 5.5


- TeKo - 2012-01-11

@michaelstone:
You have to use nfs for your pathsubstitution not the host.
host is just the ip to connect to the mysql db.