[Bug] TMDB Agent for TV does not pull in content ratings

After more issues than I can count with horribly inaccurate or just missing metadata from TVDB, I decided to switch to the OCD-friendly TMDB site/agent for my tv collection.

Thus begins my issues with properly pulling in content ratings. Initially, the oddness I was seeing, was the agent actually pulling content ratings (MPAA, like TV-MA, etc) from TVDB still. So I disabled the sub-item for TVDB, under the TMDB agent, under Shows.

After many debugging attempts as to why the rating was still stuck on the TVDB information, I found it was stale metadata xml’s in the show’s folder, under Metadata/TV Shows/a/2f2881c496c8e51cae78b4495eea3e8d316ea18.bundle/Contents. I decided to just unmatch the show, clear agent http caches, and re-match the show. Doing this, confirmed my longtime suspicion that Plex simply does not scrape content ratings from TMDB.

I am attaching proof-of-issue XML, for the overall information for the show Luther, which I verified to contain the proper metadata on TMDB (but not on TVDB). This file is located in: /mnt/user/appdata/plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/a/2f2881c496c8e51cae78b4495eea3e8d316ea18.bundle/Contents/com.plexapp.agents.themoviedb

Info from TVDB, which contains more metadata: 0bin - encrypted pastebin

Info from TMDB, which is missing metadata: 0bin - encrypted pastebin

DEBUG logs from this issue: Plex Media Server.log (5.0 MB)

I highly suspect this is due to lack of updates from the PMS team, according to the GH page: https://github.com/plexinc-agents/TheMovieDB.bundle

Please do not say I should be using TVDB, unless you would like to incite an argument where I show you how much I’ve had to fix there versus TMDB :slight_smile:

Not sure if I should glob these two together, but there is also a separate issue contained in the above post:
Changing metadata agents (in this case, TVDB -> TMDB), and running a force refresh, does not result in ‘flushed’ metadata. In other words, old metadata is still present.

Thank you for the analysis!
I have filed your report into the internal bug tracker.

1 Like

This is still an issue on v1.13.9.5439

@OttoKerner any ideas? I now have 28 shows that have no content ratings due to this issue.

Actually @OttoKerner is this what the current iteration of TMDB that Plex is using? Github

If so, I will make the modifications myself or hire a developer to get this done faster.

EDIT:
Actually, looking at this for less than 10 minutes, I see this is in the movie section of code, but not at all used in TV section of the code (along with quite a bit of other metadata missing from TV):

for country in tmdb_dict['releases']['countries']:
      if country['iso_3166_1'] == countrycode.COUNTRY_TO_CODE[c]:

        # Content rating.
        if 'certification' in country and country['certification'] != '':
          if countrycode.COUNTRY_TO_CODE[c] == 'US':
            metadata['content_rating'] = country['certification']
          else:
            metadata['content_rating'] = '%s/%s' % (countrycode.COUNTRY_TO_CODE[c].lower(), country['certification'])

        break

Can you tell me where this scraper is located, so I can patch this myself?

EDIT 2: Please ask the team to review this: https://github.com/plexinc-agents/TheMovieDB.bundle/pull/50

EDIT 3: Back to square one, from an old dev it says that repo is no longer what is used, but it probably is, since it carried the same issue with it :wink:

Gonna bug the devs now:
@timwoj @drzoidberg33 @gbooker02 @emilybersin

Bump.
@timwoj @drzoidberg33 @gbooker02 @emilybersin

I am at 41 shows with no content rating now.

Bump.
@timwoj @drzoidberg33 @gbooker02 @emilybersin

@timwoj @drzoidberg33 @gbooker02 @emilybersin

Can someone at least tell me where to patch this myself? Or is Plex using a proxy node for TMDB and it’s no longer locally managed code?

I think the agent sits in this folder (on Windows at least. adaptation for other platforms should be easy, though. )
C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-ff8c68352\TheMovieDB.bundle
Keep in mind that the Plugins folder will almost always get renamed/overwritten with a new software release of the server.

I’m using the Linuxserver.io Docker on unRAID, and I think this is the comparable folder for me, which does not have that bundle:

ls appdata/plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/ -la
total 0
drwxrwxrwx 1 nobody users 292 Oct 10 17:04 ./
drwxrwxrwx 1 nobody users 512 Oct 20 08:03 ../
drwxrwxrwx 1 nobody users  62 Sep 12 23:42 Audiobooks.bundle/
drwxr-xr-x 1 nobody users  16 Oct 10 17:04 Services.bundle/
drwxrwxrwx 1 nobody users  16 Sep 12 23:42 SiteConfigurations.bundle/
drwxrwxrwx 1 nobody users  16 Sep 12 23:42 Sub-Zero.bundle/
drwxrwxrwx 1 nobody users  56 Sep 12 23:42 Trakttv.bundle/
drwxrwxrwx 1 nobody users  32 Sep 12 23:42 WebManager.bundle/
drwxrwxrwx 1 nobody users  76 Sep 12 23:42 WebTools.bundle/
drwxrwxrwx 1 nobody users  54 Sep 12 23:42 XBMCnfoMoviesImporter.bundle/

No, this is in the Plex data folder.
You need the ‘plugins’ folder in the Plex program folder. Where the Plex binaries are.

1 Like

Found it. Thanks for the tip, I had to drop into console for that docker, and I used find to locate the folder, which is /usr/lib/plexmediaserver/Resources/Plug-ins-7303bc002

Looks like the plugin has been slightly modified here and there: https://www.diffchecker.com/Xd2KNDGB

Unfortunately my code changes did not fix the issue. Any ETA on this from the developers?

Why was this not included in the latest sever update?
@timwoj @drzoidberg33 @gbooker02 @emilybersin and @elan for good measure

Please resist the urge to ping a bazillion employees. We all get notification emails, so there’s no need to over-ping (and it can have the effect opposite to the one you’re looking for).

The server releases happen in a set cadence, and there is a QA phase. You should expect at least another few weeks before we would be able to test and integrate the requested change. That being said, I don’t know the exact status of your change.

With all due respect Elan, the only way to get any kind of helpful communication, is to ping you, and you alone (no one else but sixones has responded to anything I’ve tagged). I fully understand you personally are not involved in every code change, but you are the only one I can ever get to respond to me (just check how many times I tried to get someone above). Show me a bug tracker, or environment where I can see progress and contribute, and I can stop tagging. Until then, the Plex forums (and yes, tagging employees) is the only way that has been proven effective to get in touch with developers and to get things done.

I now have 49 shows without ratings because of this bug, and that is just getting out of hand.

@elan (because tagging anyone else is pointless now) this should especially be given priority, due to the lack of stability from TVDB in the last few days: http://www.isitdownrightnow.com/thetvdb.com.html (timeouts, intermittent downtime)

@elan were you able to check the status of this issue report?

Please stop pinging me. There’s no status to report.