Kodi Community Forum
HOW-TO:Share libraries using MySQL: Wiki Edition - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
--- Thread: HOW-TO:Share libraries using MySQL: Wiki Edition (/showthread.php?tid=157572)

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 30 31 32 33 34 35 36 37 38 39 40


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - geny - 2013-11-29

Has anyone assignments & presentations tried to sync a box search baby names on eden and frodo?


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - extide - 2013-11-30

(2013-03-03, 20:28)EddieB606 Wrote: When doing this, I lose the TV and Movie buttons on the Home Window. I have to go into Videos>Files>TV.... Is this correct, or did I do something wrong? That's a pain. Using the UPnP settings, I can keep those buttons on my main box and just go through all this on the extra boxes.

If you lose the TV and Movie buttons, it is either because you are pointing to an empty database, OR your settings are incorrect. You can check the xbmc log file to see if it is connecting properly. If it is then you will need at add your media sources, and it will scan them in over some time. If you are trying to add a media source, and it doesn't 'save' then your mysql settings are probably incorrect.

Some things to check:
-Make sure mysql is up and running
-Make sure mysql is listening on 0.0.0.0 and NOT 127.0.0.1
-Make sure the user XBMC is using has enough permissions. (I would suggest a grant all to start out)
-Dont use the NAME field in the advancedsettings.xml as it does cause problems! (This should probably be fixed.... but for now don't use it!)


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - DetrieZ - 2013-12-03

Still struggling with MySQL... Databases are not being created
Windows 7

At what point are the databases created? I would think, when you first run XBMC on a networked machine that has an advancedsettings xml file pointing to the MySQL machine?
Here are the contents of the file in both the MySQL Machine and the networked machine,
Code:
<advancedsettings>
<!-- <pathsubstitution>
  <substitute>
    <from>special://profile/playlists/</from>
    <to>smb://192.168.1.126/userdata/playlists/</to>
  </substitute>
    <substitute>
    <from>special://profile/addon_data/</from>
    <to>smb://192.168.1.126/addon_data/</to>
  </substitute>
    <substitute>
    <from>special://profile/sources.xml</from>
    <to>smb://192.168.1.126/userdata/sources.xml</to>
  </substitute>
    <substitute>
    <from>special://profile/RssFeeds.xml</from>
    <to>smb://192.168.1.126/userdata/RssFeeds.xml</to>
  </substitute>
    <substitute>
    <from>special://profile/favourites.xml</from>
    <to>smb://192.168.1.126/userdata/favourites.xml</to>
  </substitute>
</pathsubstitution> -->
    <videodatabase>
        <type>mysql</type>
        <host>192.168.1.126</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>
    <musicdatabase>
        <type>mysql</type>
        <ost>192.168.1.126</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>
    <!--<videolibrary>
          <importwatchedstate>true</importwatchedstate>
     </videolibrary>
    <network>
        <cachemembuffersize>0</cachemembuffersize>
    </network> -->
</advancedsettings>



RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Ned Scott - 2013-12-03

(2013-12-03, 01:11)DetrieZ Wrote: Still struggling with MySQL... Databases are not being created
Windows 7

At what point are the databases created? I would think, when you first run XBMC on a networked machine that has an advancedsettings xml file pointing to the MySQL machine?

Yes, that is when it should be created. Can you get us a debug log (wiki) from one of the XBMC instances when it starts up?


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - black_eagle - 2013-12-03

(2013-12-03, 01:11)DetrieZ Wrote: Still struggling with MySQL... Databases are not being created
Windows 7


<advancedsettings>
<!-- <pathsubstitution>
<substitute>
<from>special://profile/playlists/</from>
<to>smb://192.168.1.126/userdata/playlists/</to>
</substitute>
<substitute>
<from>special://profile/addon_data/</from>
<to>smb://192.168.1.126/addon_data/</to>
</substitute>
<substitute>
<from>special://profile/sources.xml</from>
<to>smb://192.168.1.126/userdata/sources.xml</to>
</substitute>
<substitute>
<from>special://profile/RssFeeds.xml</from>
<to>smb://192.168.1.126/userdata/RssFeeds.xml</to>
</substitute>
<substitute>
<from>special://profile/favourites.xml</from>
<to>smb://192.168.1.126/userdata/favourites.xml</to>
</substitute>
</pathsubstitution> -->

<videodatabase>
<type>mysql</type>
<host>192.168.1.126</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<ost>192.168.1.126</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<!--<videolibrary>
<importwatchedstate>true</importwatchedstate>
</videolibrary>
<network>
<cachemembuffersize>0</cachemembuffersize>
</network> -->

</advancedsettings>

The parts highlighted red are commented out, is that intentional ? And the part highlighted blue is a typo that needs correcting if you just copied/pasted your xml.

You can check if the DB's are created by logging into mysql as the administrative user you set up when you installed it and typing show databases; at the prompt.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - john_austin - 2013-12-18

Hi,

I've finally decided to give this a try. I have 3 ATV2s, a NAS (source) with TV and Movie files, and have installed mariaDB on a RaspberryPi (Arch OS) for the central SQL DB (library). Currently each ATV has a local library, with all pointing to same SMB source (NAS).

I'm confused on the final steps of the setup.

1) In the wiki, step 2, it says to export DB. Where do these files go? Are they on the ATV?

2) step 3 states to add advancedsettings.xml, with RaspberryPi IP - done, so ATVs are looking at an empty DB?

3) step 4, adding network sources, is where I'm lost, since this appears to populate the SQL DB on the IP specified in advancedsettings.xml.
- 4.1 "If you have a pre-existing local source, remove that source first" - I don't have a local source, my source is the NAS, which is not changing?
- in 4.2, "select the shared network folder that you set up previously". Is this the source (NAS) or the DB (RaspberryPi)?
- 4.3, I don't use XBMC for music (N/a)
- 4.4 'You can now add files and update the library from any of your XBMC devices and the library for all of them will stay in sync.' I add files directly to NAS and then update library from xbmc on ATV using the addon. This script will need to only be on one ATV and will update the SQL DB ?

Thanks for any assistance, I know many have already used this guide successfully, I just can't connect the dots this time.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Ned Scott - 2013-12-18

1) Exported files are stored along side the video files. Each video in the library gets an .nfo file and at least one image file, which contains the metadata (summary, watched status, title, etc) for that video.

2) I'm not sure what you are asking here. You need to add the advancedsettings.xml file to each XBMC install that you are using, as it says in the guide. At this point the database is presumed to be empty.

3) I've tried to clarify this part again, as it lost a little meaning when someone updated it.

You can ignore the part about local sources. You basically just need to scan the library back into XBMC using your NAS source.

You can continue to use an update add-on for the library, and only one XBMC install would need the add-on. The rest will see the same updates, because they are all sharing the same database.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - neo2k - 2013-12-18

Hi,

i have just a quick question. We are a bunch of guys living in a shared flat and we have a server hosting all our movies and we all use XBMC. Now i'd like to have one central database with the library on that server. But to complicate things we'd like to have per user configurations so every single user has its own "maked as watched" feature.

Is this possible with one single central database or do we need to have one database per user on that server?
It'd be great if we needed only one database, because scrapping takes a lot of time and keeping several databases up to date is very annoying.


Thank you in advance.

regards Waldemar


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - john_austin - 2013-12-18

Ned, thanks. I think the revised step 4 is more clear now. You may want to consider adding "Restart XBMC" after step 3 (adding advancedsettings.xml). Also, that the previous sources/library will be empty, thus requiring you to do the 'add' or "set content".

One thing I'm not clear about is the interaction between the SQL DB and the local (ATV) XBMC library. When new content is added to the NAS and 'update library' is executed on one ATV install of XBMC, the SQL DB must be updated since it is visible to all ATV instances of XBMC. But is the data also stored (and updated) in a local library on each ATV? Can I delete the local DB's on each ATV?


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Ned Scott - 2013-12-19

(2013-12-18, 17:52)john_austin Wrote: Ned, thanks. I think the revised step 4 is more clear now. You may want to consider adding "Restart XBMC" after step 3 (adding advancedsettings.xml). Also, that the previous sources/library will be empty, thus requiring you to do the 'add' or "set content".

One thing I'm not clear about is the interaction between the SQL DB and the local (ATV) XBMC library. When new content is added to the NAS and 'update library' is executed on one ATV install of XBMC, the SQL DB must be updated since it is visible to all ATV instances of XBMC. But is the data also stored (and updated) in a local library on each ATV? Can I delete the local DB's on each ATV?

The local library is completely ignored when MySQL is being used. Each XBMC install directly accesses the MySQL server for all information.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Ned Scott - 2013-12-19

(2013-12-18, 14:37)neo2k Wrote: Hi,

i have just a quick question. We are a bunch of guys living in a shared flat and we have a server hosting all our movies and we all use XBMC. Now i'd like to have one central database with the library on that server. But to complicate things we'd like to have per user configurations so every single user has its own "maked as watched" feature.

Is this possible with one single central database or do we need to have one database per user on that server?
It'd be great if we needed only one database, because scrapping takes a lot of time and keeping several databases up to date is very annoying.


Thank you in advance.

regards Waldemar

I wouldn't use MySQL for this. What I would do is update on one HTPC, then export (wiki) the library as multiple files. That basically saves a local copy of all the data, and when the other HTPCs update they will use the local files rather than re-download from the library. All libraries will be the same, but you'll be able to have separate watch status, and it should be faster.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - neo2k - 2013-12-19

Thank you Ned.

If i get you right there will be several copies of the library (every user will have one copy on his local machine) and if the file structure on the server changes we will need to update everyone's local copy manually. Thats a pain in the as don't you agree?

I would prefere if there was a way to have just one central library. So if the file structure changes or files are added and or deleted on the server one doesn't have to distribute a new version of the library to everyone's machine.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Ned Scott - 2013-12-19

Life's a bitch.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - neo2k - 2013-12-19

Yeah. I was hoping there is another way.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - EddieB606 - 2013-12-19

Maybe I'm wrong, but I think there is a misunderstanding here. There would only be one library, but each machine would have a separate database. Correct? That's how I'm doing it with me and my son. I only have one library, but I sync the database in the living room with my bedroom, so both have the same "marked as watched" shows. The one in my sons room does not sync, he has his own database and his shows only mark watched on his machine. There is only one library, but separate databases. I use an auto update addon on his machine and the one in the living room, so when a show is added to the library, the databases automatically update on each. Easy, I don't have to do anything. Changing the file structure though, how often do you do that? and why?

I am assuming the by library, we mean the actual downloaded shows, and by database, the list of whats on the server.


This forum uses Lukasz Tkacz MyBB addons.