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 - ivanmmj - 2013-08-01

(2013-07-25, 20:22)winestock Wrote:
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries

Ned,

In http://wiki.xbmc.org/index.php?title=HOW-TO:Share_libraries_using_MySQL/Setting_up_MySQL, the Arch Linux tab needs to be fixed, change:

3.To have it automatically launch at startup: sudo systemctl start mysqld.service

To:

3.To have it automatically launch at startup: sudo systemctl enable mysqld

EDIT: Actually the "Arch Linux" tab is duplicating what you put in http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Setting_up_MySQL/ALARM with the exception of step 1 (sudo pacman -Syu mysql). Suggest merging the two together. By the way, Arch Linux and Alarm (Arch Linux ARM) are the same thing.

Oh, I didn't even notice your ARM page when I wrote the Arch instructions. Had I seen it, I would have merged them.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - johnyb - 2013-08-01

(2013-07-31, 21:56)MilhouseVH Wrote: That's not a debug log, and please use xbmclogs.com or pastebin.com - the service you have used mangles the text and uses proportional fonts which make it harder to follow.
Sorry, not sure what you mean, its not a debug log? I followed http://wiki.xbmc.org/index.php?title=Log_file/Easy as much as I could but 'XBMC Log Uploader' would not install so I copied the log file out manually.
http://xbmclogs.com/show.php?id=41310


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Milhouse - 2013-08-01

Turn ON debug logging in Settings.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Barry D. - 2013-08-01

(2013-07-31, 04:05)Barry D. Wrote:
(2013-07-31, 03:37)Ned Scott Wrote: Can you post another debug log while doing a library update/scan?

I'll have to reload some of the TV series first. Give me 24hrs.

Ned,

After reloading some series to run the test it seemed to work OK.

However, I did find some other issues.

I added 3 movies to the host but they didn't show up under Movies. I did find them in 'Video|Files' and had to get Movie Information before they appeared. I though MySQL would automatically do this...or do I have to export the library every time time I add Movies?

The other issue I probably didn't understand from the wiki concerning the 'advancedsettings.xml' file is that it is only changed (per the wiki) for the remotes and not the host. I had it the same for both and got double entries on my host with one entry showing the local file address (E:\Movies) and the other entry showing the data base address (smb:\\192.168.x.x). If I have to add new movies manually on my remotes I don't see the benefit of using MySQL.

I think I also discovered what is causing the "X-TV Series" entry. I have a series named 'Hitchhikers Guide to the Galaxy" and when it was scraped I discovered the 6 episodes where in "X-TV Series" and not in "Hitchhikers...". I deleted the "X-TV Series" entry (but not the files) and re-scanned "Hitchhikers..." for new content and everything worked fine. Probably never will understand how "X-TV Series" got scraped.


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

If you add a movie to the library to one XBMC instance and it does not show up on another XBMC instance, then they are not using the same MySQL library, or are not using MySQL at all. When MySQL databases are used, it is impossible to have a different library across XBMC instances. No exporting is required to add a movie. You only need to update the library, just as you would for a normal local database. Without debug logs, I cannot tell you why it doesn't work for you.

All XBMC devices must have the same path. Even the local machine MUST use the SMB file path.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Dilligaf - 2013-08-01

In order for XBMC to have deleted all your tv videos it would have to have thought that the X tv series folder was a level above them, I would guess that your tv folder was named x something or the drive was X, If it thought that your Hitchhiker folder was X tv series then only that folder would have been deleted. I hope this makes some sort of sense.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Barry D. - 2013-08-01

(2013-08-01, 09:57)Ned Scott Wrote: If you add a movie to the library to one XBMC instance and it does not show up on another XBMC instance, then they are not using the same MySQL library, or are not using MySQL at all. When MySQL databases are used, it is impossible to have a different library across XBMC instances. No exporting is required to add a movie. You only need to update the library, just as you would for a normal local database. Without debug logs, I cannot tell you why it doesn't work for you.

All XBMC devices must have the same path. Even the local machine MUST use the SMB file path.

Ned,

I definitely misunderstood the wiki if I have to install MySQL on my remote android devices as well. I only add movies and series to the host and thought that was the only system that required MySQL.

Do I need to visit the Google Play Store to see if they have MySQL for my tablets?


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Milhouse - 2013-08-01

You don't need to install MySQL on each device, but you do need to configure each XBMC device to use MySQL - that means adding the same MySQL configuration details to advancedsettings.xml on each XBMC client.

If you don't want a client to be able to scan the library, don't configure any sources on that client (delete sources.xml). Only a client with a valid sources.xml can scan your library, so just configure your sources on your host and leave all the other clients without any sources.xml.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - johnyb - 2013-08-01

(2013-08-01, 09:10)MilhouseVH Wrote: Turn ON debug logging in Settings.
Hi, I did turn on debug previously but this time I noticed the additional info at top of the screen is retained after the reboot - so hoping this time its ok. Log

UPDATE: I noticed the logs have entried such as "GetImageHash - unable to stat url smb://192.168.0.35/Movies/127 Hours (2010)-poster.jpg" but that share nolonger includes those jpg files. When I exported my library before creating the MySQL dbs they existed, I suppose when I added the share on System (a) it looked for them and must have deleted them?


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Milhouse - 2013-08-01

Why would System(a) have deleted the artwork files?

Obviously that's your problem though - you scanned in the library on System(a) which meant the artwork has been cached locally, the artwork was then subsequently deleted by some process (maybe XBMC, maybe not) but because the artwork had already been cached on System(a) it's still visible on System(a). As the artwork has now been deleted, there is nothing for System(b) to cache and display. You need to restore the artwork.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Barry D. - 2013-08-02

(2013-08-01, 10:21)Dilligaf Wrote: In order for XBMC to have deleted all your tv videos it would have to have thought that the X tv series folder was a level above them, I would guess that your tv folder was named x something or the drive was X, If it thought that your Hitchhiker folder was X tv series then only that folder would have been deleted. I hope this makes some sort of sense.

The drive is F:, the topmost folder is TV Series. The "Hitchhiker..." folder is in folder TV Series. "X - TV Series" pops up when I scrape "Hitchhiker..." for the first time and shows 6 files associated with it. However "Hitchhiker..." which has 6 files shows no files associated with it. When I remove "X - TV Series" and scan for new content for "Hitchhiker..." the files get associated correctly.

I checked TVDB and there is an entry for "X - TV Series" but I can't understand how it is being picked up when I am scraping "Hitchhiker...".

It isn't really a problem for me now as I know how to handle it but it is still a curiosity.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Barry D. - 2013-08-02

(2013-08-01, 09:57)Ned Scott Wrote: All XBMC devices must have the same path. Even the local machine MUST use the SMB file path.

This was definitely the key. After re-reading the wiki and seeing this mentioned I changed the path from local drives to smb and everything fell into place nicely Smile...except that "X-TV Series" thing. Huh

Thanks for your patience and help.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - johnyb - 2013-08-04

(2013-08-01, 23:48)MilhouseVH Wrote: Why would System(a) have deleted the artwork files?

Obviously that's your problem though - you scanned in the library on System(a) which meant the artwork has been cached locally, the artwork was then subsequently deleted by some process (maybe XBMC, maybe not) but because the artwork had already been cached on System(a) it's still visible on System(a). As the artwork has now been deleted, there is nothing for System(b) to cache and display. You need to restore the artwork.

Ok so tried this. Exported the library again (single files) tothe movie share, then deleted the share from (b) readded it and it re-imported the movie libary. Now it seems better but show is showing thumbnails on more movies but seems to be taking ages to load still, system A immediatley loads the thumgnails. They are on same LAN both cabled, both same hardware, both running on SD cards.
Attached latest logs for into. Latest log

I was of of the impression each XBMC system creates its own thumbnails locally it it doesnt have the image in its local cache. So why would I need to have the images in the Movie share itself for this to work. Also then what happens when a new movie is added? There will not be thumbnail images is the Movie share (because ive not exported the library) - Will thumbnails only appear on the system the library was updated on?
Thanks


BTW: When iniitally adding the advancedsettings.xml file to each of the systems (as per guide), it doesnt say reboot beeen adding the xml file and importing the library. I have been doing to since assume XBMC will only pickup this xml file from boot. Is this correct?

So I did...
(1) Copy this advancedsettings.xml file you just created to the userdata folder of every XBMC install you want to sync with.
(2) REBOOT
(3) Open any of your XBMC installs and re-import your library data (If you have not created a library yet you can skip this step)....


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - Milhouse - 2013-08-04

(2013-08-04, 09:48)johnyb Wrote: Now it seems better but show is showing thumbnails on more movies but seems to be taking ages to load still, system A immediatley loads the thumgnails.

Sounds like delays due to caching. If you want to automate that, there's a script for that.

(2013-08-04, 09:48)johnyb Wrote: I was of of the impression each XBMC system creates its own thumbnails locally it it doesnt have the image in its local cache. So why would I need to have the images in the Movie share itself for this to work.

Yes, each client will cache artwork locally for performance reasons. Low powered clients may also resize artwork so that it is smaller, with reduced quality, but faster to display. Each client needs access to the original artwork (in your case, on your share) so that they can create their locally cached (and potentially resized) version.

(2013-08-04, 09:48)johnyb Wrote: Also then what happens when a new movie is added? There will not be thumbnail images is the Movie share (because ive not exported the library) - Will thumbnails only appear on the system the library was updated on?
Thanks

You should ensure that artwork is available on the share before you scan in new movies, otherwise artwork will be retrieved from the internet. Use a media manager like Ember.

The problem with internet artwork is that although the artwork may exist at the time you scan in the movie on Client A, it may have changed (or may even no longer exist) by the time client B, C or D tries to access it for its local cache. If you want consistency of quality and availability across all of your clients, stick with local artwork.

(2013-08-04, 09:48)johnyb Wrote: BTW: When iniitally adding the advancedsettings.xml file to each of the systems (as per guide), it doesnt say reboot beeen adding the xml file and importing the library. I have been doing to since assume XBMC will only pickup this xml file from boot. Is this correct?

Restarting XBMC is necessary to pick up the changes in a modified advancedsettings.xml - if the easiest way to achieve a restart of XBMC on your platform is by rebooting then so be it. Exiting XBMC and restarting is usually sufficient.


RE: HOW-TO synchronize XBMC between every room in the house: Wiki Edition - sekoku - 2013-08-04

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.64</host>
<port>3306</port>
<user>jaska</user>
<pass>jaska</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.64</host>
<port>3306</port>
<user>jaska</user>
<pass>jaska</pass>
</musicdatabase>
</advancedsettings>

Is that right? i dont get it working Sad


This forum uses Lukasz Tkacz MyBB addons.