[Bug] in Matcher tt0061563 vs. tt0063308

Even with the correct IMDB-ID in the filename, Plex matches both movies into one (tt0063308). This is wrong. These are two different movies:

Escondido (1967) {imdb-tt0061563}.mkv
Mehr Tot Als Lebendig (1968) {imdb-tt0063308}.mkv

Thanks for listening.

They show up as two different movies on our end.

How exactly are the files organised in their parent folders and are they not accidentally the exact same file?

Thanks for your answer. They are completely different. Please see below. TowerVM01 is a VM with remote SMB Shares on Unraid.:

root@TowerVM01:/mnt/disk20/Filme/Mehr Tot Als Lebendig (1968)# ls -la
total 19918648
drwxrwxrwx  2 nobody users         116 Sep  3  2020 ./
drwxrwxrwx 66 nobody users        8192 Sep  5 12:01 ../
-rwxrwxrwx  1 nobody users 20396211619 Feb 24  2019 Mehr\ Tot\ Als\ Lebendig\ (1968)\ {imdb-tt0063308}.mkv*

root@TowerVM01:/mnt/disk16/Filme/Escondido (1967)# ls -la
total 26960612
drwxrwxrwx   2 nobody users          59 Oct 19 16:30 ./
drwxrwxrwx 615 nobody users       32768 Oct 19 16:38 ../
-rwxrwxrwx   1 nobody users 27607615326 Oct 19 08:57 Escondido\ (1967)\ {imdb-tt0061563}.mkv*

The result in Plex - both applied to the first one:

Just an idea: If you look at IMDB. Both share the same localized name “Escondido”. But that would mean that Plex ignores the IMDB-ID in the filename here.

FYI… the ids should be in the folder name for the scanner to pick them up correctly. So, Mehr Tot Als Lebendig (1968) {imdb-tt0063308} as an example. They are not needed on the filename as the matching is done at the folder level.

I do have it that way for a fairly large library since a very long time. All other entries are working perfect. It’s just these two currently.

And to your idea: What about users that put all MKVs into one media folder. No, I doubt that it is neccessary on folder level.

You just got lucky :slight_smile:

Placing movies in a flat structure is bad practice and causes performance issues, especially for large libraries. When plex detects a file change (or addition) in a folder it re-scans them all. So if you have 1,000 movies in a flat structure and add 1 then plex will scan 1,001 movies instead of just the 1 if you had it in its own folder. Its not recommended at all to use flat structures.

This all has nothing to do with the fact that you can place - say three - different movies into one folder. Name them appropriate and the scanner/matcher should pick the correct content based on the given IMBD-IDs:

/folder/
/folder/Escondido (1967) {imdb-tt0061563}.mkv
/folder/Mehr Tot Als Lebendig (1968) {imdb-tt0063308}.mkv
/folder/Movie3 (1234) {imdb-tt1234567}.mkv

In bet in that case Plex would create two movies ((#1 or #2) and #3) and join #1 and #2 into one. Will check that if I’m at home later.

And I repeat my other bet: The second one (Mehr tot als lebendig) is named in a foreign country as “Escondido”. It’s pretty obvious that this is the real reason. And if that is the real reason, than the IMDB-ID checker has not the priority it should have.

You can’t tell if it’s matching the IDs or simply the title+year.
Therefore inconclusive.

Do it as recommended, with each movie in its own folder and the IMDb ID in the folder name.
Do the renaming during a Plex Dance, to prevent a “sticky” matching.

Exactly. In this example the movie library points to /mnt/disk20/Filme with folders for these movies (not a flat structure) …

/mnt/disk20/Filme/Mehr Tot Als Lebendig (1968)
/mnt/disk16/Filme/Escondido (1967)

and then ids on the files Mehr Tot Als Lebendig (1968) {imdb-tt0063308}.mkv. So the scanner/matcher (in my experience) would have attempted the match on the folder names and completely skipped the filenames with the ids.

Anyhow, I’ll move along now.

I understand. If there’s a detailed and unique hint (the IMDB-ID) Plex might dicide to not take that into account and use the title and year to search instead.

Should I laugh or should I cry :wink:

I think it tries first to match against the folder itself. If you use individual folders per movie (as you are here), it will first match if there is an IMDB ID in the folder name, but if there isn’t it will attempt to use the folder name itself.

If this method fails, I suspect Plex will then look at the movie(s) within the folder. Here, it looks at the file name for an IMDB ID, and if there is none, it uses the filename itself. So:

  1. Folder IMDB ID
  2. Folder Name <-(Plex matches here, stops trying anything else)
  3. File IMDB ID
  4. File Name

Since you name your folders the name of the movie, it never gets to the part where it checks the filename itself for the ID, simply using the movie name in the folder. You must have gotten lucky in all your other folders that use names-but-no-ids in that they matched using the name just fine. This seems to be an issue here though, in that one movie uses an alternate title that is identical to the other’s primary title. Unlucky.

If you do not wish to fix all folder names to include the ID (I do not blame you if you don’t), then you can just manually fix this one mistaken-match case. Split the files, check the “Get Info” and find the one that matched wrong, choose fix match on that one. Use the IMDB ID if you need to.

1 Like

Did it and it worked that way. Thanks.

Eventually I will change foldernames because I have a script to do that automatically for filenames already. It’s just two more lines of code.

But I first need to test if I can remove this extra ID from the filename then. And I need to test how that fits into the additional “edition-” tag because this one needs to applied to filenames only.

I would have coded, that content files and their filenames should have highest priority always. All details should be applied there and not on folder level. But when I went to IT class I listened to Supertramp…

This would have been my order:

  1. File IMDB ID <-(Plex matches here, stops trying anything else)
  2. File Name

Who cares about folder names if there are naming rules for content files :wink:

I am spitballing here about the FOLDER > FILENAME idea. I thought about it some more, and think that it might be a scoring-type system. Attempt a match against all 4 possibilities I mention above.

  1. FOLDER-IMDB-ID would get a zero (no ID).
  2. FOLDER-MOVIE-NAME would get a 9 for the wrong movie.
  3. FILENAME-IMDB-ID would get a 10 for the right movie.
  4. FILENAME-MOVIE-NAME would get a 9 for the wrong movie.

Add all those scores up, and Plex sees 18 for the wrong movie, and 10 for the correct one. The higher score wins, and Plex matches against the wrong movie.

Again, this is TOTAL speculation on my end. I’m probably completely off the mark here, as I would expect the presence of an IMDB ID in the folder OR filename to take 100% precedence over the filename itself. The entire point of the ID is that you - the server admin - were 100% sure the IMDB ID is the movie that is contained in the file, regardless of the filename.

I rename my files to make sense numerically. In a large series, I might even prefix movies with the series name and series index number, which has all kinds of issues when Plex tries to match it. The Fast and Furious franchise is horrible for not sticking with a good naming scheme.

So if I rename these files using Fast and Furious 2: 2 Fast 2 Furious.EXT, Plex might fail to match them correctly. I would then include the ID in the filename to get the match right. And I would be 100% in my right to think that the ID should over-rule the filename matching.

That’s what I was tryin’ to explain ^^^^

Re. “it’s pure luck’: In my library I do normalize folder-/filenames autmatically because I don’t want to include ('”!,.;-äöüß - you get the idea) in filenames. So I take the Plex title, year, IMDB-ID and -edition to create a filename like that:

Koenigreich Der Himmel (2005) {imdb-tt0320661} {edition-Director’s Cut}.mkv

The corresponding foldername is this:

Koenigreich Der Himmel (2005)

The case mentioned yesterday is the first one that did hit me.

Do you want to laugh? As I said, I do rename automatically. That’s true for TV-Shows and it’s episodes as well. And when I recognized that episode names change often I removed the episode title from the filename and set it into the MKV Metadata as title instead. So I do have hundreth of files named “S01E01.mkv” :wink: Even this works like a charm:

Loriot (1997) {tvdb-80127}/
Loriot (1997) {tvdb-80127}/S01E01.mkv

Twin Peaks (1990) {tvdb-70533}/
Twin Peaks (1990) {tvdb-70533}/S01E01.mkv

Never bothered with Season subfolders. As long everything works that way I will not change my scripts.

About your Show naming scheme… I do that! Mostly. I don’t fiddle with (include) the metadata in my MKV files, but I also do not have the show name in the file. Plex’s recommendation is to include that, but I have never found it to be necessary to Plex matching the shows. I’ve determined that Plex solely looks at the first SxxExx part of a filename to determine the episode, then goes out to TVDB/TMDB to figure out what metadata to pull for that number. That is it. If the episode number changes in their database, Plex updates it locally for you. This sucks, but I would hope that those sites would refrain from moving around episode numbers often to prevent a mismatch unless it was really important.

Show sub-folders I do use to organize my files, but only if there are two different types (specials/movies and a season). If it is a single season show (anime, no OVAs), I plop it in the main folder. If there are multiple kinds of specials (OVAs, Extras, Movies) I put the S00Exx into a folder named that. Plex doesn’t seem to care much about the name of the sub-folders, simply the name of the file within them. I haven’t experimented with a flat folder structure for all files like you seem to do, but only because I do not like that organization scheme, but I suspected it’d work just fine. Good to know you use it successfully.

I do include the episode title in the file, but that is a leftover from pre-plex when I needed to know what the episode was about while looking at it in Windows Explorer. It’s irrelevant to Plex’s purpose, but important to me.

Overall, I guess I just really like figuring out how Plex works, based on seeing its behavior on the front-end here.

Thought I’d add to this conversation that having .nfo files within movie folders, named exactly like the movie file itself and with only the IMDB ID inside, will result in a 100% match every time. It disregards both the folder and file name.

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