Can someone explain this matching logic?

Server Version#: 1.17.0.1709
Player Version#: 4.8.3

I’m having issues with matching that just started, or at least I just noticed (very possible since I just moved my whole library over to a new NAS). I just can’t fathom what logic is going into the calculation of these scores. Here’s one example (screenshot attached):
The option with an exact name and year match has a score of 60, while 4 movies with titles that don’t match literally any word and some with a different year all score higher. What’s going on here??

Do you have all your movies in one directory?

Yes. All movies are in the same directory.

Check out file naming;

movie/
Fast and Furious (2009)/
Fast and Furious (2009).mp4

and extras would also be added to the movie directory
image

How will creating a new directory change the matching score? I don’t have any local extras, so it seems completely unnecessary to create a folder with a single video file inside. Also, the matching screen (and themoviedb) shows “Fast & Furious”, so why would “Fast and Furious” produce a better result? I double checked, and I have 6 other movies with “&” in the file name, and they were all matched correctly.

FWIW, it was easy enough to click on the correct entry and get all the correct metadata, so I don’t have an ongoing issue. I posted this topic more out of personal curiosity in the algorithm and to potentially highlight some error if there is one.

If your media is properly organized and named then you won’t have to match anything.

My media is organized and named exactly the way Plex recommends. Could you provide a little more detail to your comment/recommendation?

Here’s a screenshot from: https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/

the “and” or “&” doesn’t matter as much as the file structure,

Plex uses the directory along with the file name to determine which movie it’s searching for.
Other years of Fast and Furious in the same directory would be more confusing to separate out.

It’s not confusing them with other Fast and Furious because they’re named correctly as well. If it were, they would show up as duplicates, and then I would split them apart. As you can see from my original post, it’s confusing “Fast & Furious (2009)” with “Land of the Lost (2009)”, which I do actually have in my library as well, and to perform this Fix Match I had to first split the duplicate “Land of the Lost” entry apart.

Can anyone from Plex who actually knows how the algorithm works chime in on this?

Settings, Agents.
Drag Local Media Assets to the bottom of the active agents under all tabs in TV Shows and Movies.

Refresh metadata and hope your naming and structuring matches TVDB, TMDB or IMDB.

Local Media Assets is already at the bottom of my agents, and it’s clear in my original post that my naming matches TMDB verbatim

A’ight.

Speaking of Logic - if any where being applied they wouldn’t have done this:

After which, in a perfect world, an exact file name - as we have with Fast & Furious (2009) - wouldn’t match to Land of the Lost (2009), but it does:

Before Plex went all ‘New and Improved’ on their ‘matching logic’ (in an effort to fix Plex-DVR - the lost cause) in 10 thousand titles I could say without reservation I had 2 or 3 requiring Fix Match, or Match.

I use FileBot - that goes to the Database I’m matching against and gets the exact/perfect/pristine file name - and now Plex blows at least 10% of those. How is it possible the exact file name comes up with a wrong match when it’s right there on the page? Don’t think on it for long - it’ll make you crazy.

Your options are Fix Match or Match and on bad days you’ll need the ID# from TVDB/TMDB/IMDB to complete the process.

We all feel the collective pain.

I had a similar issue recently, with the movie “Mask” (1985 - Cher - Sam Elliott)

Even though the filename was clearly set as Mask (1985).mkv,
Plex kept identifying it as Mask (2013), and applying the wrong poster, etc.

Doing a “fix match”, and selecting the proper movie did nothing;
it stubbornly refused to change the poster, or any of the details.

I was curious at that point, so tried a number of “fixes” for it.
Manually editing the “Original Date”, and locking it in caused
an immediate, spot-on match, but I shouldn’t have to do that,
since the correct year is in the title of the folder, and the file name.

I twiddled around with it for a bit, even going so far as to using
an MKV editor on it, and populating names and dates in the MKV headers.

After that, a re-scan of the library caused it to become merged
with The Mask (1994 - Jim Carrey) for reasons unknown.

I unmatched them, KO’d the Mask (1985).mkv file,
re-scanned the library. . . then copied the file back into
the movie directory, and did another scan.

This time, as I watched it on-screen, it briefly displayed a
thumbnail of a scene from the movie itself, flipped around,
and for a brief moment, showed the correct poster for the movie,
then flipped back over to the thumbnail scene from the movie.

I went in to edit, to the posters section.

It had several possible posters from the 1985 movie that were correct,
as well as one poster from a 2013 movie. . . and one poster from “The Mask”,
neither of which were correct.

Arrgh.

So. . . one more time. . . delete the file, re-scan.
This time, I took the added step of deleting the bundles,
and emptying the trash.

I put the movie back in, and waited for the library to update.

It scanned, showed the movie thumbnail. . . and stopped there.

Hmmm. Why no poster?

I opened up posters. . .and this time, only the correct posters
for the movie were visible. . . AND there was a check-mark on
the first poster. . . but that was not what it was displaying.

So, I re-selected the first poster, hit save, and called it a day.

But, it was definitely more work than it ever needed to be,
and still not really resolved to my satisfaction,
but I didn’t want to spend any more time on it.

Curiously, I noted that if I un-matched the movie, I would have expected
its image to revert back to a plex-generated thumbnail of the content,
but, in my case, it kept flipping the thumbnail back to the same (wrong) poster.

As for the actual matching process, I agree - exact matches should take precedence.

Obviously, there are some other factors involved in computing the score.

Example - “No Country for Old Men (2007)” comes back with a score of 99.
Why 99? What is the missing piece of the puzzle? Surely not another movie
of the same name – let alone in the same year.

Exact matches (Title, and year) should come back as 100%,
unless there is more than one movie with the same name released that year.
Then I would expect to see multiple matches with identical 100% scores,
along with something that would allow the user to disambiguate the two.

“Fast & Furious” is close enough to “Fast and Furious”
to return an identical score rating for match purposes.

Likewise, any decent search engine should be able to determine that
“The Bells of St Marys” is reasonably equivalent to “The Bells of Saint Mary’s”,
and return a high-probability match - certainly higher than “The Bells of Saint John”.

But, who knows. . . 'tis a mad, mad world we live in. :wink:

As a follow up – I guess it would be important to understand
where the matching actually occurs.

Is Plex searching a database itself, and then calculating scores?

Or, is Plex merely sending the search string to an external website such as
IMDB or TMDb, and simply relaying the scores that their search engine provides?

Can’t really blame Plex, if the latter is true.

This happens after a wrong match, when the file name is only changed after it already happened. You then must dance: Plex incorrectly identifying TV episodes - #4 by OttoKerner

I think you nailed it, JuiceWSA. It used to be extremely rare that I encountered mismatches, and usually only with very obscure movies.

As a huge advocate of Plex to others and also just a generally curious professional engineer, I’d love to know how it works (or rather doesn’t anymore). If any mod who actually knows has time to chime in it would be cool.

This is a side effect of a feature, which is intended to help when the user decides to rename his files and folder.
Normally, a changed file name would mean: this is now a different video. So all the matching and determining of file format and generating of preview thumbs and fetching of metadata has to happen again.
To avoid that, Plex stores a kind of hash value of the content of the file in its database. Which allows it to recognize files it had matched before, even if they are now in a different folder, under a different name.

Unfortunately, this is contrary what should happen if the previous file name caused a mismatch. Hence the need for the Dance, to clear that hash from the database.

…and in 40 years Plex has been unable to invent a better ‘mouse trap’.

Mandatory Reading for the Informed Plex User:

There is no question. One day (perhaps soon) you will need to Dance.

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