Kodi Community Forum
MySQL - Library update stopped working correctly - 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 - Library update stopped working correctly (/showthread.php?tid=305065)

Pages: 1 2


MySQL - Library update stopped working correctly - logictester - 2017-01-26

Hello,

I'm using MySQL DB to share the Movie and TV libraries between 2 devices. Everything worked perfectly on Jarvis, but since the upgrade to Krypton i have a strange issue - in Jarvis i used to only update the library in the main Kodi and this would update the library in the second device as well, but now only one device is updated and on the second device i have to manually trigger library update, the same goes for watched shows and movies - if i watch a show on one device - the other will still have that show as unwatched until i do a manual library update. The only thing that still works perfectly is resume between the devices so if i start a show on one device and stop in the middle - when i start the same show on the other device it continues from the same point.

Any ideas?

Thanks!


RE: MySQL - Library update stopped working correctly - Headcase_Fargon - 2017-01-26

Are both devices running Krypton? Every new release (practically) creates a new copy of the database and uses that. So if you have one device using Jarvis it will use MyVideos99 (as an example) whereas the Krypton one will use MyVideos107. It actually looks like they've been through a few schemas in Krypton alone, according to this page. So all devices would need to use the same beta release as well.


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-26

(2017-01-26, 22:45)Headcase_Fargon Wrote: Are both devices running Krypton? Every new release (practically) creates a new copy of the database and uses that. So if you have one device using Jarvis it will use MyVideos99 (as an example) whereas the Krypton one will use MyVideos107. It actually looks like they've been through a few schemas in Krypton alone, according to this page. So all devices would need to use the same beta release as well.

both devices are running the exact same version - Krypton RC and were upgraded on the same day


RE: MySQL - Library update stopped working correctly - Headcase_Fargon - 2017-01-26

In that case you might want to check the logs of both to see if one is having trouble accessing the database. I just updated to Krypton and was getting unable to access database errors in one machine until I turned on the "wait for network" option.


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-26

i don't see any DB related errors in the log, it shows: 7:43:40.286 T:2948588448 NOTICE: Running database version xbmc_video107 which is correct on both and i am able to connect to everything and see everything correctly after manual library update.. it's very strange
where can i find the "wait for network" setting? is it in advancedsettings.xml?


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

just tried another scan, main device shows:
1:45:12.312 T:139644013868800 NOTICE: VideoInfoScanner: Starting scan ..
21:45:13.551 T:139644013868800 ERROR: GetDirectory - Error getting ------ don't know what this error message means
21:45:26.810 T:139644013868800 ERROR: Previous line repeats 2 times.
21:45:26.810 T:139644013868800 NOTICE: CleanDatabase: Starting videodatabase cleanup ..
21:45:27.604 T:139644013868800 NOTICE: CleanDatabase: Cleaning videodatabase done. Operation took 00:00
21:45:27.614 T:139644013868800 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:15


but second device has no scan messages in the log...


RE: MySQL - Library update stopped working correctly - Koying - 2017-01-27

Are you actually sure both devices use mysql?
From your description, it'd seem the 2nd one does not.

Look for a "connected to mysql" message in the logs


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

i don't see connected to mysql on either devices logs. but the advancedsettings.xml has mysql configured on both and resume video works perfectly, also after manually scanning the library - it adjusts itself and gets all the correct watched statuses


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

after enabling debug log, both devices logs show: DEBUG: Mysql execute: update path set and other mysql related lines on scan library execute


RE: MySQL - Library update stopped working correctly - Koying - 2017-01-27

Post both full debug logs, please


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

Kodi - main device:

https://justpaste.it/12vh1

Kodi - 2nd device:

https://justpaste.it/12vgz


RE: MySQL - Library update stopped working correctly - Koying - 2017-01-27

Strange indeed:
Code:
14:16:53.828 T:140252131870464 DEBUG: VideoInfoScanner: Rescanning dir 'smb://LOGICTESTER/HD/TV Shows/American Horror Story/' due to change (0A9364860040E3276AD072BE48AB35B4 != EAE97EA36831FF4368DC491E154175A8)
...
14:16:54.154 T:140252131870464 DEBUG: Mysql execute: update path set strHash='EAE97EA36831FF4368DC491E154175A8' where idPath=1541

Code:
14:24:59.371 T:2442130336 DEBUG: VideoInfoScanner: Rescanning dir 'smb://LOGICTESTER/HD/TV Shows/American Horror Story/' due to change (EAE97EA36831FF4368DC491E154175A8 != 0A9364860040E3276AD072BE48AB35B4)
...
14:24:59.939 T:2442130336 DEBUG: Mysql execute: update path set strHash='0A9364860040E3276AD072BE48AB35B4' where idPath=1541

Looks like the 2 devices do not calculate their hashes the same way...


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

what could be causing this? used to work fine before the upgrade.... should i maybe remove the db on the second device and tart over? what would be the be the process?

Thanks for looking into this


RE: MySQL - Library update stopped working correctly - Koying - 2017-01-27

That being said, that's probably not the cause of you initial issue.

When you say "the other will still have that show as unwatched", is it true even if you exit Kodi and re-enter?


RE: MySQL - Library update stopped working correctly - logictester - 2017-01-27

I haven't tried rebooting, but simply running a manual library scan marks everything as it should be, all watched statuses match on both boxes and all new items are added to the second box