Kodi Community Forum
Can't update library when connected to mysql - 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: Can't update library when connected to mysql (/showthread.php?tid=336012)



Can't update library when connected to mysql - bassmannate - 2018-09-30

Hello,

I'm running Kodi 17.6 on Ubuntu 16.04 (but planning on running on various Android devices as well)
I have my media repository on a rpi2 running the latest raspbian. The mysql server is also running on this same device. Before adding the advancedsettings.xml, I'm able to scan the repositories remotely over smb share and add them to my library. After adding the advancedsettings.xml, I can still view the files in the files section but I am unable to scan them to the library.

It appears that I'm connecting to the mysql server no problem (took me a while to figure out what I was doing wrong to allow connections) and it's even created my databases. however, when I go to update the library, it's simply not scanning. Looks like it scans for a very short time and then stops like it didn't find anything in the sources that I already have set up.

kodi.log: https://pastebin.com/TPMMBzEF


RE: Can't update library when connected to mysql - Karellen - 2018-09-30

Looks like you haven't set up your Sources.


RE: Can't update library when connected to mysql - bassmannate - 2018-09-30

Do I need to go in, remove my existing sources and add them again?

Edit: my sources.xml: https://pastebin.com/GS4Ay8gx


RE: Can't update library when connected to mysql - Karellen - 2018-09-30

(2018-09-30, 21:04)bassmannate Wrote: After adding the advancedsettings.xml, I can still view the files in the files section but I am unable to scan them to the library.
Library Sources are stored in the database. By adding the database XML tags in the advancedsettings.xml file, you have swapped databases from local SQL to shared MySQL, so your library sources no longer exist. Yes, they need to be re-added so they are registered in the new database.

The Sources.xml file only holds the path for Videos>Files view and has no relevance to the library.


RE: Can't update library when connected to mysql - bassmannate - 2018-09-30

Well then, that worked. I could have sworn I tried that but maybe it was before I figured out that I wasn't actually connecting to my database. Thanks!

In theory, I just need to copy my advancedsettings.xml and my sources.xml to each device now, right?


RE: Can't update library when connected to mysql - Klojum - 2018-09-30

(2018-09-30, 22:20)bassmannate Wrote: I just need to copy my advancedsettings.xml and my sources.xml to each device now, right?
Possibly the passwords.xml file as well as the favourites.xml file. If you have most fanart/backgrounds/thumbs etcetera for your media, you can also copy the userdata/Database/Textures13.db file and the whole userdata/Thumbnails folder to all other connected clients.


RE: Can't update library when connected to mysql - black_eagle - 2018-10-01

(2018-09-30, 22:20)bassmannate Wrote: Well then, that worked. I could have sworn I tried that but maybe it was before I figured out that I wasn't actually connecting to my database. Thanks!

In theory, I just need to copy my advancedsettings.xml and my sources.xml to each device now, right?
 Actually, you don't need to copy the sources.xml file to each device.  The full network paths are held in the MySQL db so your machines will get the file locations from there.  You only really need sources.xml copying across if you want to be able to browse those locations through either Videos -> files, or through the file browser.  But, if everything is added to the library correctly, then there's no real need to do that.


RE: Can't update library when connected to mysql - nikeb - 2019-08-25

Sorry to pick up an old thread, but i did the same thing with my sources.xml and password.xml locally on my kodi machine, everything is up and running , i can open my shares from files and the movies are working, but i can t make kodi update my sql library.

Do i have also to configure every source with the scraper and everything?

Thanks


RE: Can't update library when connected to mysql - Klojum - 2019-08-25

(2019-08-25, 10:24)nikeb Wrote: Do i have also to configure every source with the scraper and everything?

Yep. Sources do not know by themselves what they are until you tell Kodi what they contain: movies, tv shows, music videos, or music.
Once those are set and locked in the database, you can have Kodi scrape those sources.

Here is some reading material for you: https://kodi.wiki/view/HOW-TO:Create_Video_Library


RE: Can't update library when connected to mysql - nikeb - 2019-08-25

(2019-08-25, 11:17)Klojum Wrote:
(2019-08-25, 10:24)nikeb Wrote: Do i have also to configure every source with the scraper and everything?

Yep. Sources do not know by themselves what they are until you tell Kodi what they contain: movies, tv shows, music videos, or music.
Once those are set and locked in the database, you can have Kodi scrape those sources.

Here is some reading material for you: https://kodi.wiki/view/HOW-TO:Create_Video_Library

I've always have a huge library with nfo and artwork set locally, if i m not wrong i would scrape that Only on the master kodi, then the others would Be automatically sets (artworks and everything) without and scrape. Am i right?

I m trying to use mysql for the first time and migrate all my kodi instances


RE: Can't update library when connected to mysql - Klojum - 2019-08-25

Best is to fully set up your main/master Kodi client. Once that runs, you can connect and set up other Kodi clients:

- copy advancedsettings.xml file or its mysql settings only to the Kodi client.
- copy from the userdata folder: sources.xml, passwords.xml and mediasources.xml where necessary.
- copy from the userdata/Database folder: Textures13.db to the Kodi client.
- copy the userdata/Thumbnails folder to the Kodi client to so not all thumbs have to be re-cached.