thetvdb / metadata.tvshows.thetvdb.com.v4.python

TheTVDB Official Kodi TV plugin
9 stars 3 forks source link

Investigate why Kodi TV scraper seems to only pull two season posters for every show #13

Closed antheaezzell closed 1 year ago

antheaezzell commented 1 year ago

Just started using v4 on CoreELEC 19.4 after scraping from TMDB for quite a while. I'm just just wondering if it's normal not getting all of the season poster variants that TVDB have on file, since I'm not a paying contributor and haven't entered a PIN? It seems I'm only able to choose between two season posters consistently on every show season.

Kodi Forum thread - https://forum.kodi.tv/showthread.php?tid=368272&pid=3108223#pid3108223

KarellenX commented 1 year ago

There is a bug in Kodi that is described here... https://github.com/xbmc/xbmc/issues/15768

In short, it affects those users that have a shared MySQL/MariaDB setup. If the blob of artwork links is too large for the database field, the scrape is rejected. This caused numerous posts on the forum and at one time it was among the top 5 reported problems on the site.

It was never fixed as the Team could never reach agreement on how to fix. Some wanted the db field modified, others felt it unrealistic to save hundreds of links for artwork that, in most cases, would never be viewed. Not sure what TheTVDB does, but TheMovieDB seems to purge artwork on an irregular basis, thus making artwork links a perishable item.

When the Python scrapers were first introduced, it was easier to manage data so the number of artwork links that were scraped was limited to avoid this exact problem. Instead of saving potentially hundreds of links for artwork, it was trimmed to a more realistic figure, 25 IIRC for movies, and a complex calculation for tv shows to deal with tv show and season artwork. Episodes are not an issue as they only ever have a small number of links.

I have a suspicion, this is what the user is reporting.

If TheTVDB limits the number of artwork per movie and tv show, you could probably do away with that limiting function, but if artwork is a free-for-all like it is at TheMovieDB, some movies (Avengers Endgame) and tv shows (Game of Thrones, Simpsons) have an unreasonably large collection of posters and fanart that would break scraping.

It would also help if the OP provides the name of the shows where this issue was encountered.

romanvm commented 1 year ago

Knowing about the original issue, I put a hard limit of 10 for each artwork type. Obviously, for season posters some smarter algorithm is needed.

antheaezzell commented 1 year ago

@KarellenX I believe this was handled in the recent 1.1.2 release. I can post to the forums to let the user know and then will close this ticket.