Kodi Community Forum
Letting Kodi generate meta data? - 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: Letting Kodi generate meta data? (/showthread.php?tid=355559)

Pages: 1 2


RE: Letting Kodi generate meta data? - DarrenHill - 2020-10-08

If you have NFO files, then those will always be taken in preference to scraping from the internet. So if they are from the old API then they will just be reloaded again and so your problem will persist.

The watched status is stored in the database, so if the entry gets screwed up and has to be reset then it will also be lost. That's why solutions like the ones mentioned were put in place to give a separate backup/restore for just that element of things. I can't comment about Trakt in detail, as I don't use it (I don't generally bother about watched status on my box).

As you're looking at doing some major changes, it would be worth backing up your database in case you do want or need to roll back later. You'll find it in the database sub-folder of your userdata (wiki) folder, although you can just back up the whole userdata (wiki) folder to get all the configuration except for the addons installed themselves (those are in the addons folder at the same level, go up a level to the .kodi folder to see that).


RE: Letting Kodi generate meta data? - snowjim - 2020-10-08

Removed all nfo files in med both series shares, alot of them! Kodi is however still not adding anything to the library. Have tried to do the process of removing content type and adding it again, still nothing in library?


RE: Letting Kodi generate meta data? - snowjim - 2020-10-08

There is really nothing left to backup in database? All the watched flags is gone and metadata will be dowloaded by kodi anyway now when nfo files is missing.


RE: Letting Kodi generate meta data? - Klojum - 2020-10-08

(2020-10-08, 12:04)snowjim Wrote: There is really nothing left to backup in database?

I may have missed a couple of steps of what you all did, but a SQL database is mostly like a light switch: on or off. Either the data is there or not.
And just like any other data source, if you want a bit of security, you will need to make backups of your data. Just in case, you know.

The watched and resume statuses can be exported by Kodi into nfo files. Those options need to be activated by settings in the advancedsettings.xml file.

(2020-10-08, 12:02)snowjim Wrote: Have tried to do the process of removing content type and adding it again, still nothing in library?

Set the content setting of your video source to the correct setting (Movies, TVshows, etc), and let Kodi scrape for metadata. The default scraper for TheTVDB should find pretty much all of your content.


RE: Letting Kodi generate meta data? - DarrenHill - 2020-10-08

Ah, forgot you were using MySQL (wiki), so the database isn't stored where I said it was above, as of course it's on your SQL server.

It's still worth backing it up (it's worth doing routinely anyway), but you'll need to use something like phpMyAdmin or similar SQL tools (outside of Kodi) to do it.


RE: Letting Kodi generate meta data? - snowjim - 2020-10-08

Here is a new log : x

The TV Show in Kodi do still not contain any items at all.


RE: Letting Kodi generate meta data? - snowjim - 2020-10-08

I have had bad experience with MySQL and backup, lost a lot of date when exported data could not be important for some random reason. It have never worked out of the box, I always hade to make some strange changes to the export file before it was working. 

I have always been using MySQL Workbench that do not even come close to the robustness of MS SQL Manager. Really never any problems exporting and importing in MSSQL Smile . But I guess it depends on what you are use to work with.

I tried to make a backup in MySQL before I started the changes but Workbench 8.0 did not like exporting from a MySQL 5.7 database. I tried to find a MySQL Workbench for 5.7 but gave up. I don´t remember why I am using a MySQL 5.7 database but there was some kind of problems using a MySQL 8 database, maybe it hade to do with the export and import again.

So to get this MySQL database on track, what should I do? First I need to export the database, how do I do this without a MySQL Workbench 5.7? And how do I make sure this database can be imported to latest version of MySQL? 

I understand that MySQL might not be your expertise but maybe you could help me out any way?


RE: Letting Kodi generate meta data? - Klojum - 2020-10-08

2020-10-08 12:34:25.406 T:22088 NOTICE: MYSQL: Connected to version 5.7.28-log
Seems like the database connection is there alright. MySQL is now at 5.7.31 I think, but 28 should do as well. It is the current stable version. MySQL has worked fine for me in the last 8 years of Ubuntu Linux. Perhaps it's the Windows versions that are having hiccups?

(2020-10-08, 12:53)snowjim Wrote: I have always been using MySQL Workbench that do not even come close to the robustness of MS SQL Manager
I dunno, I've never head problems with MySQL Workbench in all those years (used in Linux OSes), perhaps I'm not that demanding. Right now the only thing I use it for is making SQL dumps of both Kodi databases.

(2020-10-08, 12:53)snowjim Wrote: So to get this MySQL database on track, what should I do? First I need to export the database, how do I do this without a MySQL Workbench 5.7?
I thought there was no data in your database... then there is nothing to export as well.
But alternatively, there is mysqldump, which you can operate via the commandline. See https://meta.wikimedia.org/wiki/Database_dump_and_restore_examples
Don't forget the option to add the (re)creation of schemas... Otherwise restoring data will be a much bigger hassle.

If the export has been done successfully, you could opt to drop the current database(s), and restart Kodi so you can start with a clean slate. Add your video source(s), set the content, and rescrape your video collection.


RE: Letting Kodi generate meta data? - snowjim - 2020-10-08

The MySQL database do still got watch flags for movies but I'm not sure how important that really is when using Trakt. Trakt will do a check of the Kodi library at startup and set watched according to its records so the question is if there even is a point for me to have a MySQL database anymore? Maybe one, if Kodi do not manage to get the correct match then then correction have to be done on each Kodi installation.

It sounds like I should just install latest version of MySQL and let Kodi create a new Database and then Trakt will be used to set the watched flags.

Yes, its possible that most of the problems I have hade is due to the Windows version. Or it could also be that I expect the easy of MSSQL where you just click backup and restore, no worries about different encodings or checkboxes that needs to be set or even manual changes to the script to get it working. I have used MySQL for many development projects but only under Windows, now I'm using MSSQL as far as possible, no more hassle for me. Smile


RE: Letting Kodi generate meta data? - snowjim - 2020-10-09

Okay, I did a total reinstall of MySQL 8 and Kodi 18.8. Kodi MySQL and now Kodi will not connect to the database : 

2020-10-09 21:21:40.570 T:17068   DEBUG: CIRServerSuite::Connect: connecting to: 127.0.0.1:24000 ...
2020-10-09 21:21:42.574 T:17068   DEBUG: CIRServerSuite::Connect: failed to connect
2020-10-09 21:21:42.574 T:17068    INFO: CIRServerSuite:Tonguerocess: failed to connect to irss, will keep retrying every 5 seconds
2020-10-09 21:21:43.575 T:9448   ERROR: Unable to open database: MyVideos116 [2059](Plugin caching_sha2_password could not be loaded: The specified module could not be found. Library path is 'lib/mariadb/plugin/caching_sha2_password.dll')

The advancedsettings.xml is copied from the old version that worked fine.

<advancedsettings>
  <loglevel>2</loglevel>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.1.10</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>*******</pass>
  </videodatabase> 
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.1.10</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>*******</pass>
  </musicdatabase>
       <videolibrary>
         <dateadded>0</dateadded>
        <importwatchedstate>true</importwatchedstate>
        <importresumepoint>true</importresumepoint>
       </videolibrary>
  </advancedsettings>

I have tried to login(workbench to MySQL with the Kodi and create/delete schema and that worked great.

I have checked Kodi Wiki but could not see that I forgot anything? So any clues?


RE: Letting Kodi generate meta data? - snowjim - 2020-10-10

Okay, I got it working, hade to reinstall MySQL 8 two times with different settings(first time default), the second time I tried the legacy password choice, maybe that was the solution. However, I am quite used to MySQL failing in one way or another so I avoid it as far as possible.