I use the TheMovieDB for loading metadata for my tv shows but lately more and more data is missing in Plex when adding new episodes. While the first episodes may have the correct title, description, episode screenshot, etc. the newer episodes get nothing except the air data. The screenshot does not update (just a random screenshot from the video file), the description is empty and the title of the episode is only some “Episode XY” with the number.
This is the view of Last Week Tonight for episodes 8-10 of the current season 5:
Just for comparison, this is the date on TheMovieDB website:
As you can see in my Plex screenshot the last two episodes don’t have any real episode name. And episode 8 has somehow loaded something from TVDBs description for this website https://www.thetvdb.com/series/last-week-tonight-with-john-oliver/episodes/6587063 (not the title, and not the whole description, not even from the beginning) while I have TVDB unchecked in my agent configuration.
I checked the MovieDB API, too https://api.tmdb.org/3/tv/60694/season/5?api_key=XXXXXXXX&language=en and the correct data is available:
And this is also one of the URLs that is embedded in the the metadata agent https://github.com/plexinc-agents/TheMovieDB.bundle/blob/master/Contents/Code/init.py)
Sadly the Plex Logs are not very helpful. Even in Debug mode I couldn’t find a clue what data Plex is trying to load, from which URLs etc.
But i saw, that Plex is matching the show ID and seasons/episodes correctly:
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - * Season 5 (-1) Episode 9 (-1) (2018-04-22)
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - Looking up season and index for an episode, indexKey=S05E09 dateKey=2018-04-22.
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - * Found episode with key S05E09
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - * Found episode s05e09
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - Migrating metadata settings from local://91450 -> com.plexapp.agents.themoviedb://60694/5/9?lang=en
May 14, 2018 09:28:49.723 [0x7f321a3fd700] DEBUG - -> Simply giving existing setting new GUID.
May 14, 2018 09:28:49.747 [0x7f321a3fd700] VERBOSE - Skipping expensive tags write for 'Episode 128' (type: 5) since nothing changed.
May 14, 2018 09:28:49.747 [0x7f321a3fd700] VERBOSE - Skipping expensive tags write for 'Episode 128' (type: 4) since nothing changed.
May 14, 2018 09:28:49.747 [0x7f321a3fd700] VERBOSE - Skipping expensive tags write for 'Episode 128' (type: 7) since nothing changed.
May 14, 2018 09:28:49.747 [0x7f321a3fd700] VERBOSE - Skipping expensive tags write for 'Episode 128' (type: 6) since nothing changed.
May 14, 2018 09:28:49.748 [0x7f321a3fd700] DEBUG - Item 91450 (Episode 128) Scanning metadata graphic elements in XML file "seasons/5/episodes"/9.xml
May 14, 2018 09:28:49.748 [0x7f321a3fd700] DEBUG - Item 91450 (Episode 128) Scanning metadata graphic elements in XML file "seasons/5/episodes"/9.xml
May 14, 2018 09:28:49.749 [0x7f321a3fd700] DEBUG - Loading information from media bundle for part ID 180999 from "/data/Plex/Plex Media Server/Media/localhost/8/42804b8e380bed1ce6cfc3974a6ae440a5f0876.bundle/Contents"
May 14, 2018 09:28:49.749 [0x7f321a3fd700] DEBUG - There was a change for metadata item 91450 (Episode 128), saving.
May 14, 2018 09:28:49.749 [0x7f321a3fd700] DEBUG - Updating metadata item (save) (Episode 128) with ID 91450
This results in a XML file somewhere in the Plex metadata subfolder on the hdd a/2ed7c7afc1d6fb51ef9fd0d061f0a1107c4bde7.bundle/Contents/_combined/seasons/5/episodes/9.xml with the content:
<?xml version='1.0' encoding='utf-8'?>
<Episode>
<directors/>
<guest_stars/>
<originally_available_at>2018-04-22</originally_available_at>
<producers/>
<tags/>
<thumbs/>
<title>Episode 128</title>
<writers/>
</Episode>
Even if I delete this file or change it, after I run a metadata update, it is restored exactly to that version. I also tried to clean up caches, clear trash, to remove and re-add the show. Everytime the data is restored to that missing content.
So the question for me is: where does Plex load the data, is it somehow cached, so how can I invalidate the cache? Or are the parser errors? How can it be fixed.