Is there a way to find which IMDB title Plex has matched to?

Server Version#: 4.77.3
Player Version#: 4.77.3

I am using the new plex scanner and library, not the legacy.
Is there a way for me to query the plex database to find which IMDB title it has matched a movie to? I do specify IMDB in .nfo files. I would like to be able to see what Plex used instead.

I tried this, but not really seeing any data that looks like an IMDB.

            SELECT *
            FROM metadata_items AS I
            INNER JOIN media_items AS M
            ON M.metadata_item_id = I.id
            INNER JOIN media_parts AS P
            ON M.Id = P.media_item_id
            INNER JOIN library_sections AS S
            ON S.id = I.library_section_id
            WHERE S.section_type = 1
            AND file LIKE '%xxxxxx%'

Use Home · WebTools-NG/WebTools-NG Wiki · GitHub to find out in bulk.

If you just want to know for a single item, take a look at the Plex media info XML.

2 Likes

In my experience with .nfo files, Plex will always match to that ID, even if the folder or movie name is something entirely different.

Thanks to your help, I found exactly what I needed. With this, I can write a script that compares plex matches, to what I specified, and I can correct the ones that plex did not match correctly.

SELECT *
fROM taggings AS G
INNER JOIN tags AS T
ON G.tag_id = t.id
WHERE G.metadata_item_id = xxxxx
AND tag_type = 314

It doesn’t.

Care to elaborate? I have accidentally and intentionally mismatched IMDB IDs and folder/movie names, and Plex has always matched to the ID rather than the name. Haven’t tried this in a while, so perhaps the behavior with the new agent is different, but either way, I’ve never had a mismatch that I didn’t cause myself.

Sorry, not particularly. Too many trolls here. I tried to once, and all everyone wanted to do was crash on me about how it was my fault that the January update turned Plex into a real sloppy matcher.
Sorry.
I’d rather spend my time writing tools to help me fix the bad matches Plex does, and keep an eye on the matching that it does.

Ok. So I proved my theory. Despite all the hoopla about Plex matching to IMDB, it’s actually rarely true.
In my case, I have 16,524 movies. I wrote the query below, to figure out how many are actually matched to imdb. Only 2,425 are actually linked to an IMDB, even though all 16,524 have .nfo files set.
So once again, there is another bug in the new Plex scanner. This January release is really a huge pile of crap.

            SELECT P.file, P.id AS media_parts_id, P.media_item_id, M.metadata_item_id, SUBSTR(tag, 8) AS tag
            FROM metadata_items AS I
            INNER JOIN media_items AS M
            ON M.metadata_item_id = I.id
            INNER JOIN media_parts AS P
            ON M.Id = P.media_item_id
			LEFT JOIN (
				SELECT T.tag, G.metadata_item_id
				FROM taggings AS G
				INNER JOIN tags AS T
				ON G.tag_id = t.id
				AND tag_type = 314
				AND tag like 'imdb:%'
			) AS X
			ON X.metadata_item_id = M.metadata_item_id
            WHERE I.library_section_id IN (1, 11, 12)

Is there a problem with those that are not directly linked, though? I’m assuming they’re still matched, no?

I’ve been using .nfo files with just the IMDB URL for the past twelve years, first with XBMC/Kodi, then continued with Plex. And like I said, I’ve never had a movie mismatch. Switched over to the new Plex agents last summer.

EDIT: Our movie count is very close, btw.

Yesterday, I added a bunch of movies, and only one would not match, even though both folder and file were named correctly. As it turns out, the IMDB ID in the .nfo file had one too many zeros in it. To me, this proves that if an .nfo file is present, Plex will match strictly to that, and if the ID is incorrect, it will not even attempt to match otherwise.

Not a troll :wink:

Thanks for the input. I pulled the link out of my .nfo file, and pasted it into Chrome. It pulled up the correct movie. So I know that is correct.

Oh, I did not mean to imply that your links are wrong. I just wanted to describe what apparently happens if they happen to be incorrect.

If you feel like replying, I’m still curious if those thousands of movies of yours are not matched at all or just don’t show as matched when you run your script.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.