Kodi Community Forum

Full Version: Rebuild ‘art’ database table
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have a Kodi installation using MySQL as the database backend. I have been having issues getting artwork to appear in the app and web interface. After lots of research and cleaning various caches, I came across the ‘art’ table in the database. Upon inspection, I noticed that many of the entries pointed to URLs on the local drive (which don’t exist since I migrated to MySQL) rather than on the web.

So, I made a database backup and cleared out the ‘art’ table. Now I have no artwork at all (which makes sense). My question is, how can I made Kodi rebuild this table? Rescanning the library does not seem to do this.

Thanks!
(2021-07-30, 05:04)patrickfrog Wrote: [ -> ]I noticed that many of the entries pointed to URLs on the local drive (which don’t exist since I migrated to MySQL) rather than on the web.

Changing the database type from SQLite to MySQL will not change the art URLs. Kodi's database tends to keep hold on old art URLs (as well as other data), so a "spring cleanup" from time to time is okay.

Rebuilding the art cache can be done by:
  1. Exit Kodi
  2. Delete/rename the local userdata/Database/Textures13.db file
  3. Delete the userdata/Thumbnails folder
  4. Restart Kodi
(2021-07-30, 05:49)Klojum Wrote: [ -> ]
(2021-07-30, 05:04)patrickfrog Wrote: [ -> ]I noticed that many of the entries pointed to URLs on the local drive (which don’t exist since I migrated to MySQL) rather than on the web.

Changing the database type from SQLite to MySQL will not change the art URLs. Kodi's database tends to keep hold on old art URLs (as well as other data), so a "spring cleanup" from time to time is okay.

Rebuilding the art cache can be done by:
  1. Exit Kodi
  2. Delete/rename the local userdata/Database/Textures13.db file
  3. Delete the userdata/Thumbnails folder
  4. Restart Kodi

I tried this (and have multiple times) but Kodi still will not rebuild the art database table. Every video has no art associated with it.
How did you add your movies and tv shows the the library- Did you use the Kodi scrapers or did you use NFO files?

The problem titles without artwork, how long ago were they added into the library and do the more recent additions have any artwork problems?
(2021-07-30, 22:50)Karellen Wrote: [ -> ]How did you add your movies and tv shows the the library- Did you use the Kodi scrapers or did you use NFO files?

The problem titles without artwork, how long ago were they added into the library and do the more recent additions have any artwork problems?

I originally had a single Kodi computer with a local database. I scraped all the information from my NAS folder of movies. I then decided to convert my database to MySQL so I could have two Kodi instances.

After doing that, I’m pretty sure I lost my artwork. However, any new movies I added since then (and then scraped) had their artwork show up correctly.

I tried all the various suggestions about clearing the artwork caches, using external tools, etc… to try to fix the issue, to not avail. I then discovered the ‘art’ table in the MySQL database. The older entries pointed to local paths instead of online URLs. I emptied this table (after making a backup) to see if Kodi would rebuild it with the correct info. However, it has not done so.
(2021-07-30, 23:11)patrickfrog Wrote: [ -> ]The older entries pointed to local paths instead of online URLs.
This is the issue. When you converted from local SQL to MySQL, how did you transfer the library? I suspect you used the Single File Export/Import method.

If you did, there is no fix. You need to delete those broken titles from your library and rescrape them.

Also consider installing Artwork Dump so it can simultaneously save the artwork locally next to your movie files, so you don't have problems in future.
(2021-07-30, 23:32)Karellen Wrote: [ -> ]
(2021-07-30, 23:11)patrickfrog Wrote: [ -> ]The older entries pointed to local paths instead of online URLs.
This is the issue. When you converted from local SQL to MySQL, how did you transfer the library? I suspect you used the Single File Export/Import method.

If you did, there is no fix. You need to delete those broken titles from your library and rescrape them.

Also consider installing Artwork Dump so it can simultaneously save the artwork locally next to your movie files, so you don't have problems in future.

That worked. I needed to remove my media sources then re-add them to force a complete rebuild of the database. Now I have artwork for everything!

I’ll take a look at the Artwork Dump addon as suggested.
Is there a fix for an art db table that has 'out-of-date' image links? E.g. links that now return a 404? I run into this more often than you'd think having a central db and spinning up new clients (maybe adding in to the 'clean db' feature a function that can verify image URLs are still valid?).
(2021-09-23, 00:54)isamudaison Wrote: [ -> ]Is there a fix for an art db table that has 'out-of-date' image links? E.g. links that now return a 404?

Both TVDB and TMDB do a 'spring-cleaning' from time to time and create new posters/fanart with new URLs, or they move their fanart files to different servers. So it's possible that your cache still contains a number of those outdated links.

IMO the only real remedy would be to start fresh and rescrape your video collection, as fanart URLs are shared by both local (Textures13.db) and main database (MyVideosXX). Unless you would like to refresh every movie separately and manually... There is no option in Kodi to refresh the entire video collection.
(2021-09-23, 01:16)Klojum Wrote: [ -> ][...]
Both TVDB and TMDB do a 'spring-cleaning' from time to time and create new posters/fanart with new URLs [...]

Gah... So the only solution is writing something that connects to the kodi db, scans your entries, tries hitting the URLs associated, if it finds a 404 response it will parse out the Media ID for that site and then do an API query against them to get a new URL. Lovely! I can see doing that in Java but it'd take some time I think...