Kodi Community Forum

Full Version: Posters not working after import of XML. Local paths found in MyVideos116.db
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I recently had to reinstall my Windows 10 PC running Kodi 18.6
I figured I'd do a clean Kodi install as well, to be sure everything was nice and clean.
However, in order to keep my watchmarks and resume points, but still get a fresh set of databases I did a Library export to a single file.

After reinstalling everything I then imported the .xml file and everything looked great.
Untill I deleted the exported library files and discovered that most of the posters, banners and thumbnails were now missing. But for some reason not all of them(?)

At first I tried deleting the thumbnails folder and the textures13.db and have Kodi autodownload the missing artwork, but that didn't help.
Then I downloaded texturecache.py and tried recaching everything by running 
Code:
texturecache.py C
 
This ran for some time, but didn't solve the problem, but instead generated a bunch of errors like this one (When running texturecache.py specifically against the movie Bringing Up Baby):
Code:
c:\Python27\python.exe texturecache.py C movies "Bringing Up Baby"

Caching artwork: 0 items remaining of 20 (qs: 0, qm: 0), 2 errors, 0 threads active (02.00 downloads per second, ETA: 00:00:00)

The following items could not be downloaded:

[fanart    ] [Bringing Up Baby                        ] C:\Temp\kodi_videodb_2020-05-12\movies\Bringing_Up_Baby_1938-fanart.jpg
[poster    ] [Bringing Up Baby                        ] C:\Temp\kodi_videodb_2020-05-12\movies\Bringing_Up_Baby_1938-poster.jpg

Cache pre-load activity summary for "movies", filtered by "Bringing Up Baby":

              |  cast.thumb |    fanart   |    poster   |    TOTAL
--------------+-------------+-------------+-------------+-------------
Cached        |      18     |      -      |      -      |      18
Deleted       |      18     |      -      |      -      |      18
Duplicate     |      -      |      -      |      -      |      0
Error         |      -      |      1      |      1      |      2
Ignored       |      -      |      -      |      -      |      0
Skipped       |      -      |      -      |      -      |      0
Undefined     |      -      |      -      |      -      |      0
======================================================================
TOTAL         |      36     |      1      |      1      |      38
Download Time | 00:00:02.31 | 00:00:01.71 | 00:00:01.72 | 00:00:03.36 

Apparently textures13.db isn't the only place, image locations are stored.
I downloaded DBBrowser and checked the art table of MyVideos116.db, which showed that 11348 rows out of 18621 pointed to the local C:\temp... path from my import.
Code:
Result: 11348 rows returned in 625ms
At line 1:
select * from art where url like "C:%"

Feeling adventurous I took a backup of MyVideos116.db and the tried deleting all of the 11348 rows, and then rerunning texturecache.py but sadly that didn't fix the problem either.
It actually caused Kodi to crash and freeze, so I restored the backup of MyVideos116.db

If I manually open the info page for each movie, or tvshow episode, and manually choose the poster art, it is fixed for that individual movie/episode. However this is not really a viable solution.

Is there any way to get texturecache.py to fix MyVideos116.db as well? 
Or even better, a way to import the XML without the local paths?
I have no idea where the filenames are even comming from, as I have always had Kodi control posters and so on through the Thumbnails directory and textures13.db.
I have never had local images anywhere in my media sources.
Yea, it is one of the drawbacks with the Single File Export and why we don't recommend it. The two drawbacks are detailed here... https://kodi.wiki/view/Import-export_lib...ingle_File

I am not aware of a fix for this.
(2020-05-12, 22:27)Karellen Wrote: [ -> ]Yea, it is one of the drawbacks with the Single File Export and why we don't recommend it. The two drawbacks are detailed here... https://kodi.wiki/view/Import-export_lib...ingle_File

I am not aware of a fix for this.

Ok.. I had been through the import/export wiki, but didn't understand it as the posters/fanart would be un-rechably tied to the location the library would be imported from.

Anyways... it lead me on the right track, and for anyone else coming across this thread with a similar problem here's how I ended up fixing it:

1: Make sure your watchmarks and resumepoints are as you would like them to be
2: Perform a new export to separate files. Choosing not to export posters/fanart. This will create a .nfo for each video file (in the same directory) containing the usual scraped info, as well as playcount and any resumepoints.
3: Quit Kodi. Delete MyVideos116.db and start Kodi again
4: Set content for your media sources (this is also stored in MyVideos116.db so will have to be reset). For convenience, select no when asked to refresh for each source.
5: Update library. Will do all sources at once.
6: Make sure everything is the way it should be.
7: Just to keep things tidy I finished with a search/delete for all .nfo files in my media sources, since these have now been imported to MyVideos116.db and are no longer needed.

And now I have my watchmarks and resumepoints they way they should be, as well as functioning posters and fanart.

A single movie (Terry Pratchett's The Colour Of Magic) wouldn't import for some reason, but could be added with the Scan to library menu, and the Wonder Woman (1974) tv-show didn't get a poster, but could be fixed with the refresh info menu.
Still way less work than either having to refresh everything manually, or coming up with some script-magic to modify the playcount entry in the database based on the exported XML file.
Thread marked solved.