Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
SQL Database not correct across devices
#1
Good afternoon all!

I’ve recently upgraded my mobile PC [win10] and was looking to set it up on my MySQL database, which I did, successfully. I also wanted to make sure that the Media Center [LibreELEC] in my living room was connected to the MySQL database, which it is. The database is sitting on my file server [win10].

The problem is that I’m missing shows and episodes watched that were sitting on my old mobile PC [win10], because I believe that I wasn’t on the database with it, but can’t remember. And because I was messing around with stuff and put the database connection on the old machine, I’ve now lost my connection to some shows there, also.

So, I’m wondering how I can force either a rescan of my MySQL database to pick up a series like Futurama, which is now missing from my list... or how to go about getting it brought in manually to my “TV Shows” list. On a side-note, I don’t remember my root password for the database, because I’m a dumb.

When I “update library” it doesn’t find the missing shows. It wasn’t even looking at new seasons of existing shows that were in the “in progress” list. To try and illustrate:

  1. We had His Dark Materials completely watched, both seasons, on the old laptop
  2. After connecting the new laptop to the SQL database, HDM was only showing 1 season
  3. I was forced to go into the episode information -> refresh -> refresh from internet
  4. Once refreshed, it finally realized that there was a whole second folder of episodes, and showed it

I had House of Cards be renamed to Cherry which took me a while to figure out, and forced a refresh in the series information, wherein I manually typed the name of the show and it changed the information.

We lost Futurama, which is still available through Videos -> TV share, but not in the TV Shows listing anywhere.

Anyone know what to do so that I can at least have the TV Shows list (I haven’t even looked at Movies yet, tbh) be the same as if I was on the share itself?

I hope I’m being clear. Please don’t hesitate to ask me to clarify... and thank you in advance for taking the time to read the post and help out!
Reply
#2
(2021-04-17, 18:51)Canadianschism Wrote: On a side-note, I don’t remember my root password for the database
You can access your database via the database's kodi user, and do a data dump as a backup. Several tools are useful for that, such as PHPMyAdmin or MySQL Workbench. Make sure you also include commands for (re)creating the database tables. Then you can rename (not delete) that video database to something temporary and have Kodi create a new/empty one. Then you can restore the data you exported data back into the new database.

For multiple Kodi clients to work properly via a centralized database, all client devices need to run the same major Kodi version: 17, 18 19... Otherwise clients will connect to different database instances.

Whatever happened to some of your shows is not easy to determine. Shows that are missed could be the result of not properly formatted subfolders and/or filenames of those shows. You'll need to give us examples of one or more.

Sometimes the database can get stuck with storing filenames but not storing its further metadata. With proper SQL knowledge, that will be hard to fix. One crude fix is to rename the folder of the TVshow, and move all episodes to that folder, and update the database. The old data will remain but should not get in the way.

As always, a debug log (wiki) of Kodi can be helpful. Provide via a pastebin service as indicated below.
Reply
#3
Thanks for the reply, Klojum!

(2021-04-17, 19:15)Klojum Wrote: You can access your database via the database's kodi user, and do a data dump as a backup. Several tools are useful for that, such as PHPMyAdmin or MySQL Workbench. Make sure you also include commands for (re)creating the database tables. Then you can rename (not delete) that video database to something temporary and have Kodi create a new/empty one. Then you can restore the data you exported data back into the new database.

I’ll have to look into this. I believe I’ve gotten HeidiSQL installed on the machine, and I should start looking at how to manipulate those sorts of things if ever that happens in the future.
Quote:For multiple Kodi clients to work properly via a centralized database, all client devices need to run the same major Kodi version: 17, 18 19... Otherwise clients will connect to different database instances.

I have them all sitting on Leia right now, as I’m not ready to move to 19 yet.
Quote:Whatever happened to some of your shows is not easy to determine. Shows that are missed could be the result of not properly formatted subfolders and/or filenames of those shows. You'll need to give us examples of one or more.

Sometimes the database can get stuck with storing filenames but not storing its further metadata. With proper SQL knowledge, that will be hard to fix. One crude fix is to rename the folder of the TVshow, and move all episodes to that folder, and update the database. The old data will remain but should not get in the way.

As always, a debug log (wiki) of Kodi can be helpful. Provide via a pastebin service as indicated below.

While I was waiting, I actually decided to take a few minutes and edit the source information. I’ve basically forced it to re-scan the whole share from TheTVDB, and, for whatever reason, it’s picked up the shows that were missing, and it seems to be following to the other two machines now for whatever reason.

I figure I must have had an itchy trigger finger the other day when I was setting this all up, and didn’t let it properly process. That’s on me.

Thanks for the spots to check, I will keep them in mind if ever something like this happens again! This seems to have been a PEBKAC/ID:10T error.
Reply
#4
(2021-04-17, 19:36)Canadianschism Wrote: This seems to have been a PEBKAC/ID:10T error.

Hmm.. That's not a term we see people portraying on themselves every day. Blush
But it's good to hear you solved (some of) your problems as well.
Reply

Logout Mark Read Team Forum Stats Members Help
SQL Database not correct across devices0