Plex Movie agent is broken for movies on imdb with ID that have 8 digits

So basically when I try to force match movies with IDs that have 8 digits in it, the Plex Movie agent will fail.

Examples:

Every single response:
<Error statusCode="400" error="Bad Request" message="Invalid ID"/>

This is a pretty serious flaw in meta.plex.tv, because IMDB IDs are starting to have 8 digits nowadays (for newer stuff being released)

This happens with every single Plex Media Server version I’ve tried in the last couple of months.

I will also attach the plexapp.agents.imdb log, when I’m trying to force match using the ID:

2019-12-20 22:06:35,908 (7f4cc5ec8700) :  INFO (agentkit:957) - Searching for matches for {'year': None, 'id': '304067', 'name': 'tt10017956'}
2019-12-20 22:06:35,908 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/304067/tree'
2019-12-20 22:06:35,912 (7f4cc5ec8700) :  INFO (__init__:403) - Found an ID, attempting quick match based on: tt10017956
2019-12-20 22:06:35,915 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'https://meta.plex.tv/m/10017956?lang=en&ratings=1&reviews=1&extras=1'
2019-12-20 22:06:36,464 (7f4cc5ec8700) :  ERROR (networking:196) - Error opening URL 'https://meta.plex.tv/m/10017956?lang=en&ratings=1&reviews=1&extras=1'
2019-12-20 22:06:36,466 (7f4cc5ec8700) :  INFO (__init__:138) - checking hash search vector: https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml
2019-12-20 22:06:36,475 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml'
2019-12-20 22:06:36,515 (7f4cc5ec8700) :  ERROR (networking:196) - Error opening URL 'https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml'

This also affects automatic matching by the agent itself. These movies won’t be matched at all, despite having both entries in TheMovieDB and IMDB.

Before someone mentions, yes, this is with the correct plex naming schema (even thought the naming doesn’t matter when I’m manually fixing the match using the ID)

Please attach full Plex Media Server logs - the zip from the Help and Troubleshooting Plex Web screen

Sorry - just noticed this is already being followed up

1 Like

Logs may help establish the scope of the problem and if it is just meta.plex.tv or within Plex Media Server as well

The problem is only with meta.plex.tv, as it is easy to just open up the URLs I provided and see the response they give when using ID with 8 digits. (Error 400 - Invalid ID)

HTTP error 400 is given when a bad request is made to a server, in this case meta.plex.tv thinks IMDB ID are only 7 digits (my guess) and when Plex Server or any other client makes a request (browser for example) providing an ID with 8 digits it gives this error.

Plex Media Server is irrelevant since the scope of the error is only with meta.plex.tv servers, this can be tested with ease:

Plex Way

  1. Make a clean install of any version of Plex Media Server (Any version, it doesn’t matter for this case)
  2. Create a movie library with the agent Plex Movie as default and add any IMDB movie that has 8 digits on the it (ttXXXXXXXX, where X is a digit)
  3. Plex won’t be able to match it.
  4. Try to manually fix the match by using the IMDB ID.
  5. It still won’t match giving out the error I described before. (Logs of the proof will appear on plexapp.agents.imdb.log)

Direct Testing

  1. Find any feature movie with an IMDB ID of 8 digits, that has also a entry in TheMovieDB.
  2. Open the following URL in any browser https://meta.plex.tv/m/XXXXXXXX?lang=en&ratings=1&reviews=1&extras=1, where XXXXXXXX is the ID from IMDB (ttXXXXXXXX)
  3. Check that the answer provided via XML from the meta.plex.tv is Bad Request - Invalid ID.

Even thought I already supplied the error above, I’m going to explain here again:

plexapp.agents.imdb.log (After I try to manually fix the match providing the IMDB ID):

2019-12-20 22:06:35,908 (7f4cc5ec8700) :  INFO (agentkit:957) - Searching for matches for {'year': None, 'id': '304067', 'name': 'tt10017956'}
2019-12-20 22:06:35,908 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/304067/tree'
2019-12-20 22:06:35,912 (7f4cc5ec8700) :  INFO (__init__:403) - Found an ID, attempting quick match based on: tt10017956
2019-12-20 22:06:35,915 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'https://meta.plex.tv/m/10017956?lang=en&ratings=1&reviews=1&extras=1'
2019-12-20 22:06:36,464 (7f4cc5ec8700) :  ERROR (networking:196) - Error opening URL 'https://meta.plex.tv/m/10017956?lang=en&ratings=1&reviews=1&extras=1'
2019-12-20 22:06:36,466 (7f4cc5ec8700) :  INFO (__init__:138) - checking hash search vector: https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml
2019-12-20 22:06:36,475 (7f4cc5ec8700) :  DEBUG (networking:143) - Requesting 'https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml'
2019-12-20 22:06:36,515 (7f4cc5ec8700) :  ERROR (networking:196) - Error opening URL 'https://meta.plex.tv/movie/hash/02/02d496c38868c9643068edd42f1d455f23567a20.xml'
  • Line 3: Agent knows I’m searching for an ID
  • Line 4: Agent requests information for that ID to meta.plex.tv,
  • Line 5: Agent receives the error 400 from meta.plex.tv, so it errors out since it’s not expecting to receive that 400 Bad Request error.

well we found some code in Plex Media Server metadata agent that picks up 7 digits. So the scope is beyond meta.plex.tv

This is now being raised as issues for the meta.plex.tv service and Plex Media Server

3 Likes

Do you mean that somewhere in the agent it was discarding the 8th digit? In all my examples above (using fix match manually) it picked up all 8 digits. I didn’t find any other problem but my tests were not extensive, so I’m just talking here about the meta.plex.tv problem I found out.

Regarding the 8 digits problem, I just wrote a script that parses IMDB own data sets that are updated daily ( https://datasets.imdbws.com/ ) to extract only the movies with an ID of 8 digits. The result was over 20k entries.

With the result in my hands, I just wrote another script to output the HTTP status code after requesting it to meta.plex.tv, using just the first 20 entries (so it won’t hammer the webserver) and the response for those 20 entries was always 400 Bad Request.

Since I don’t know the insides of this webserver I’m assuming it’s some kind of validation being made to the IDs when the webserver gets the request.

correct

1 Like

Any chance this issue would also prevent extras from populating after fixing a match manually?

You can’t manually fix the match using the Plex Movie Agent, until Plex fixes both agent and the metadata server.

You have to use TheMovieDB agent for every movie that has 8 digits IMDB ID, after that I’m not sure if this agent works with extras, but if it does, it should get the extras.

@sa2000 Any news about this?

Looking at the agent code, I found out the following restrictions that you probably were talking previously in the following lines:

Line 76

RE_IMDB_ID = Regex('^tt\d{7}$')

Line 284

if not re.match('t*[0-9]{7}', id):

Line 316

if not re.match('t*[0-9]{7}', video_id):

Line 392

if media.guid or re.match('t*[0-9]{7}', media.name):

All lines are quickly fixed by changing the {7} to {7,8}

Unfortunately since the metadata server isn’t fixed yet, I can’t really test it myself and see if anything requires more changes locally.

1 Like

Update:

The Plex Media Server agents fix is planned now for version 1.18.6 which is going into alpha testing

The changes to the back-end systems (meta.plex.tv) is planned for sometime next week

2 Likes

Yes these are changed for release 1.18.6

@sa2000 I’m curious – will the agent fix you reference above in 1.18.6 fix the issues I’m seeing with directed by not downloading from TVDB ? See link below for details …

Did you even read the title of this topic? This is a Plex Movie related bug, it does not involve TVDB/TV agents at all.

So to answer your own question: No, this specific fix is not going solve your problems since it is not related.

@IppoKun87 of course I read the topic – did you read the entire response from the developer ?

(meta.plex.tv) is planned for sometime next week …

meta.plex.tv is part of the TV agent which is why I asked. Was a simple enough question and nasty replies like yours is one of the things wrong with the people of the world today!

I’m sorry you took my answer as nasty, it wasn’t mean like that.

Still, the meta.plex.tv update that is being talked in this topic is about the Plex Movie agent.

You’ll probably just tag my answer as another nasty reply but just imagine if everyone would come here and ask about another totally unrelated problem just because meta.plex.tv is being mention here for a fix.

Plex Media Server 1.18.6.2348 is now out as beta

It has the fix for 8-digit IMDB IDs. The changes for the backend metadata services systems are already live.

  • (Metadata) Movies with 8 digit IMDB ids would not be imported (‪#10937)‬

See release note for other changes

1 Like