Plex Issue With Years Using The Movie Database Agent

Several Movies have the wrong year in Plex. Plex matches to the correct movie, but the year is way off. This only happens with The Movie Database Agent and not the Plex Movie Agent. I also confirmed that there is nothing wrong with The Movie Database; it’s a Plex issue.

A couple examples are “1941 (1979).mp4” and “Aguirre, the Wrath of God (1972).mp4”. All the movie info is correct except the year is 1999 and 1977 respectively. That’s 20 years and 5 years off.

Here is a screenshot of the 1941 movie in Plex…
image

Here is a screenshot that shows that Plex is setting the “Originally Available” date wrong…

Here is the JSON results from The Movie Database to show that the only date it provides is for 1979…

{
“adult”: false,
“backdrop_path”: “/aZTYOPxfEg4bfcXvhNnVpQ8IZya.jpg”,
“belongs_to_collection”: null,
“budget”: 35000000,
“genres”: [
{
“id”: 35,
“name”: “Comedy”
}
],
“homepage”: “”,
“id”: 11519,
“imdb_id”: “tt0078723”,
“original_language”: “en”,
“original_title”: “1941”,
“overview”: “It’s been six days since the attack on Pearl Harbor. Panic grips California, supposedly the next target of the Japanese forces. Everywhere in California, people are suffering from war nerves. Chaos erupts all over the state. An Army Air Corps Captain, a civilian with a deranged sense of Nationalism, civilian defenders, and a Motor Pool crew all end up chasing a Japanese sub planning to attack LA.”,
“popularity”: 13.191,
“poster_path”: “/sphN9W4YO63K07dH2oMDCRChgfg.jpg”,
“production_companies”: [
{
“id”: 5,
“logo_path”: “/71BqEFAF4V3qjjMPCpLuyJFB9A.png”,
“name”: “Columbia Pictures”,
“origin_country”: “US”
},
{
“id”: 6128,
“logo_path”: null,
“name”: “A-Team”,
“origin_country”: “”
},
{
“id”: 33,
“logo_path”: “/8lvHyhjr8oUKOOy2dKXoALWKdp0.png”,
“name”: “Universal Pictures”,
“origin_country”: “US”
}
],
“production_countries”: [
{
“iso_3166_1”: “US”,
“name”: “United States of America”
}
],
“release_date”: “1979-12-13”,
“revenue”: 31755742,
“runtime”: 118,
“spoken_languages”: [
{
“iso_639_1”: “en”,
“name”: “English”
},
{
“iso_639_1”: “de”,
“name”: “Deutsch”
},
{
“iso_639_1”: “it”,
“name”: “Italiano”
},
{
“iso_639_1”: “ja”,
“name”: “日本語”
}
],
“status”: “Released”,
“tagline”: “Paranoia meets pandemonium.”,
“title”: “1941”,
“video”: false,
“vote_average”: 5.8,
“vote_count”: 342
}

Is there a way to report bugs to Plex directly. This is a widespread issue and can be easily re-produced. A developer should be able to quickly debug. It appears to be setting the “orginally_avaialable_at” date before it pulls in data from The Movie Database. It then uses this date for the year. It needs to use the “release_date” from The Movie Database.

I even confirmed the error in their database…

Here are 130 movies with the issue…

Title Plex Year Years Off TheMovieDB
1941 (1979) 1999 20 11519
28 Days Later (2002) 2003 1 170
A Room with a View (1985) 1986 1 11257
Affliction (1997) 1998 1 31662
Aguirre, the Wrath of God (1972) 1977 5 2000
Almost Famous (2000) 2011 11 786
American Gangster (2007) 2008 1 4982
American Sniper (2014) 2015 1 190859
Apocalypse Now (1979) 2001 22 28
Apollo 13 (1995) 2002 7 568
Aquaman (2018) 2019 1 297802
Audition (2000) 2001 1 11075
Ballerina (2016) 2017 1 342473
Begin Again (2013) 2014 1 198277
Bend It Like Beckham (2002) 2003 1 455
Beyond the Lights (2014) 2015 1 241771
Bicycle Thieves (1948) 1949 1 5156
Blade- Trinity (2004) 2015 11 36648
Body of Lies (2008) 2009 1 12113
Box of Moonlight (1996) 1997 1 31146
Breathless (1960) 1961 1 269
Brief Encounter (1945) 1946 1 851
Chariots of Fire (1981) 1982 1 9443
Crash (2004) 2005 1 1640
Darkness (2002) 2004 2 11056
Das Boot (1981) 2015 34 387
Dawn of the Dead (1978) 1979 1 923
Daybreakers (2009) 2010 1 19901
Dead Man Walking (1995) 1996 1 687
Derailed (2005) 2006 1 8999
Dr. No (1962) 1963 1 646
Eraserhead (1978) 1977 -1 985
Foxcatcher (2014) 2015 1 87492
From Russia with Love (1963) 1964 1 657
Geostorm (2017) 2018 1 274855
Good Luck Chuck (2007) 2008 1 10030
Goosebumps (2015) 2016 1 257445
Henry V (1944) 1946 2 22638
Her (2013) 2014 1 152601
How the West Was Won (1962) 1963 1 11897
Howards End (1992) 2016 24 8293
Inherent Vice (2014) 2015 1 171274
Insidious (2010) 2011 1 49018
Instant Family (2018) 2019 1 491418
It’s a Wonderful Life (1946) 1947 1 1585
Jaws- The Revenge (1987) 1999 12 580
Just Mercy (2019) 2020 1 522212
Kind Hearts and Coronets (1949) 1950 1 11898
La Dolce Vita (1960) 1961 1 439
Life Is Beautiful (1997) 1998 1 637
Like Water for Chocolate (1992) 1993 1 18183
Lionheart (1990) 1991 1 9399
Mad Max 2 (1981) 1982 1 8810
Memento (2000) 2001 1 77
Milk (2008) 2009 1 10139
Monsieur Hulot’s Holiday (1953) 1954 1 778
Monster Trucks (2016) 2017 1 262841
Munich (2005) 2006 1 612
National Velvet (1945) 1944 -1 17641
Northanger Abbey (2007) 2008 1 18093
Nosferatu (1922) 1929 7 653
On the Basis of Sex (2018) 2019 1 339380
Once Upon a Time in the West (1968) 1969 1 335
Open Water (2003) 2004 1 83
Open Water 2- Adrift (2006) 2007 1 9592
Paddington (2014) 2015 1 116149
Paddington 2 (2017) 2018 1 346648
Paranormal Activity (2009) 2007 -2 23827
Phone Booth (2002) 2003 1 1817
Platoon (1986) 1987 1 792
Pokémon- The Movie 2000 (1999) 2000 1 12599
Quest for Fire (1981) 1982 1 62204
Rebel Without a Cause (1955) 2018 63 221
Resident Evil- The Final Chapter (2016) 2017 1 173897
Rififi (1955) 1956 1 934
Rome, Open City (1945) 1946 1 307
Rudolph the Red-Nosed Reindeer (1964) 2005 41 13382
Rumble in the Bronx (1995) 1996 1 33542
Run Lola Run (1998) 1999 1 104
Schindler’s List (1993) 2018 25 424
Seven Samurai (1954) 1956 2 346
Sixteen Candles (1984) 2011 27 15144
Smokin’ Aces (2006) 2007 1 7516
Some Like It Hot (1959) 2010 51 239
Spice World- The Movie (1997) 1998 1 6116
Spirited Away (2001) 2015 14 129
Split (2017) 2016 -1 381288
Star Wars- The Force Awakens (2015) 2016 1 140607
Straight Outta Compton (2015) 2016 1 277216
Superman II (1980) 1981 1 8536
Taken (2008) 2009 1 8681
Taken 3 (2014) 2015 1 260346
The African Queen (1952) 1951 -1 488
The Bear (1988) 1989 1 2383
The Best Exotic Marigold Hotel (2011) 2012 1 74534
The Blues Brothers (1980) 1998 18 525
The Borrowers (1997) 1998 1 9449
The Danish Girl (2015) 2016 1 306819
The Debt (2010) 2011 1 48289
The Descent (2005) 2006 1 9392
The Devil’s Advocate (1997) 2012 15 1813
The Dirty Dozen (1967) 1998 31 1654
The Gentlemen (2019) 2020 1 522627
The Gods Must Be Crazy (1980) 1984 4 8393
The Gods Must Be Crazy II (1989) 1990 1 11937
The Great Mouse Detective (1986) 1993 7 9994
The Great Wall (2016) 2017 1 311324
The Hurt Locker (2008) 2009 1 12162
The Incredibles (2004) 2005 1 9806
The King of Comedy (1982) 1983 1 262
The Lovely Bones (2009) 2010 1 7980
The Peanuts Movie (2015) 2016 1 227973
The Philadelphia Story (1940) 1941 1 981
The Place Beyond the Pines (2012) 2013 1 97367
The Postman (1994) 1995 1 11010
The Red Violin (1998) 1999 1 14283
The Sword in the Stone (1963) 1983 20 9078
The Tale of the Princess Kaguya (2013) 2014 1 149871
The Third Man (1949) 1950 1 1092
The Train (1964) 1965 1 3482
The Wages of Fear (1953) 1955 2 204
The Wicker Man (1973) 1975 2 16307
The Woman in Black 2- Angel of Death (2014) 2015 1 288158
The Year of Living Dangerously (1982) 1983 1 11541
Two Women (1960) 1961 1 24167
Underworld- Blood Wars (2016) 2017 1 346672
When Marnie Was There (2014) 2015 1 242828
Where Eagles Dare (1968) 1969 1 11046
Why Him (2016) 2017 1 356305
Widows (2018) 2019 1 401469

And these are all mp4 files?

Do this:
Go to

  • Settings - Server - Agents - Shows - TheTVDB

In there, grab the line ‘Local Media Assets’ with your mouse and drag it downwards, so it ends up being at the bottom of the stack of active agents.
Repeat the same under

  • Settings - Server - Agents - Shows - TheMovieDatabase
  • Settings - Server - Agents - Movies - Plex Movie
  • Settings - Server - Agents - Movies - TheMovieDatabase

Afterwards, ‘Refresh Metadata’ of those movies, one by one.
Wait a few minutes.
Leave the preplay screen of the movie and re-enter it.
Check the ‘Originally Available’-date.

1 Like

TMDB is overrun with contributors - who also happen to be idiots. I’m one of them, but this idiot goes over there and deletes a 2020 year from Casablanca (1942) - 'cause my cousin saw it at a friend’s house on Tuesday.

It’s absolutely a Plex Problem.
Plex is looking at the very latest date some idiot entered - when they should be looking at the oldest/original/correct release date - not the SuperDuper New DVD Release Date when I found it in a big cardboard bin down at The Wal-Mart.

The work-around…:

Join TMDB, go over there and delete ‘release dates’ that aren’t the original.
Edit the item - which you’ll have to do anyway - 'cause changes you make have to ‘ferment’ for 24 hours before they work.
And Hope Plex eventually figures out there’s something gone horribly wrong at TMDB - then do something about it.

FileBot doesn’t go sniffing around through TMDB’s hamper looking for the newest and juiciest - it just gets the release date and names the file.

Funny (not ha ha) how Plex has to make everything difficult.

I think you are mixing that up with how music used to be handled in the past.
For movies, Plex would always use the release date straight from the TMDB or IMDb.
If it happens to be wrong on there, then it will be wrong in Plex.

But in the case of the OP, I think it has to do more with incorrect metadata embedded in his mp4 files.

LMA has been breaking hearts and minds since 1948 - so I do recommend everyone Demote it as far down the agent list as possible, but there’s also this:

^That’s pure, 100% Plex dropping the ball and kicking it through the visiting team’s goalpost… 'cause guess which one Plex gets. You get one shot. Chose wisely.

1 Like

OMG this last line in there requires a hefty facepalm.
“HDTV release”. Is that even a thing? How would one even determine this date?
But I see IMDb even has the same nonsense listed.

lol… I’m tellin ya, Man…

:smiley:
or
:frowning:

first one - then the other…

Plex needs to go out drinking with Filebot.
Filebot knows what do to - Plex doesn’t.

BTW - if there ever was a time for somebody to sound the alarm at Plex HQ… this qualifies as one of those times.

2 Likes

Hi OttoKerner,

Thanks for the suggestion. I had already moved “Local Media Assets” to the bottom for each agent and unchecked it. This was done before adding the Library. Also, my video files have no tags and this happens to both the MP4s and MKVs.

It’s easy to reproduce…

  • Rename any move to “1941 (1979).mp4” and save to it’s own folder.
  • Add a Plex library for this folder using the Plex Movie Scanner with The Movie Database agent.
  • Verify that it correctly identifies the movie, but shows the year is wrong (1999) as well as the “Originally Available” date.

I have no idea where Plex is getting the 3/23/1999 date from, but it’s not on The Movie Database or in my video file tag. This specific issue appears to be a true bug and not a configuration issue.

Thanks JuiceWSA,

I went to 1941 (1979) on The Movie Database site and selected Overview - Release Dates. Plex is using the DVD release date instead of the Theatrical release date. At least now I know where the date is coming from. This confirms my theory that this is a Plex bug. They need to modify their TheMovieDB agent to use the Theatrical release date.

How do we report obvious bugs like this to Plex?

We either just did - or we didn’t.
Hard to say which.

@BigWheel
@anon18523487

The chances of it getting to the people who can fix it - got better - but we still don’t have a clue if the info has gone to a place where it can be dealt with. The ‘Problem’ has been around for 6-8 months. So Far.

1 Like

In case they’re reading this…

Here is the API call Plex is currently using…
https://api.themoviedb.org/3/movie/11519/release_dates?api_key=XXXXX

Plex should just be using https://api.themoviedb.org/3/movie/11519?api_key=XXXX&language=en-US and using the “release_date”.

However, if Plex wants to use the current API call, they need to stop picking the first release date listed for the particular language (e.g. US). They need to pick the first release date with a type of 1 (Theatrical). In the rare case that there is not a theatrical release, they should use the “release_date” associated with the movie (https://api.themoviedb.org/3/movie/11519).

{
“id”: 11519,
“results”: [
{
“iso_3166_1”: “US”,
“release_dates”: [
{
“certification”: “NR”,
“iso_639_1”: “en”,
“note”: “DVD Release”,
“release_date”: “1999-03-23T00:00:00.000Z”, <- BAD
"type": 5
},
{
“certification”: “PG”,
“iso_639_1”: “en”,
“note”: “”,
“release_date”: “1979-12-13T00:00:00.000Z”, <- GOOD
"type": 1
},

That’s good.

I’ll shoot one more flare:
@ChuckPa
I know Chuck as spoken with ‘the matching department’ - so if he has a friend over there - he could mention it.

There is a new scanner/agent in development, of which a public preview is also already available.

Chances are higher that this issue is tackled with this new development, rather than in the old Python code.

… and even higher - if somebody working at the matching engine department knows about it…

I don’t mind waiting - I know how to fix it - but knowing ‘they know’ would make me feel better.

This is a long-known bug… for non-english movies, Plex is taking a release date in that country if available.

This is pure nonsense since there can be twenty years in between the original theatre and the xyz country release date.

Everybody else in the known world is using the original release dates, be it TV movie programme guides, internet sources,. Everybody is referencing the original release date.

Please, Plex… just this time, do what everybody else is doing… since it just makes sense.

1 Like

Where do you see that it’s calling https://api.themoviedb.org/3/movie/11519/release_dates?api_key=XXXXX?

I don’t see that, exactly. I do see that the TMDB agent uses a popularity heuristic.

The Plex Movie agent and TMDB agent share a lot of code. The Plex Movie agent appears to have been updated more frequently and has better logic about candidate selection and availability year matching. I don’t think it would be hard to port some of that logic over to the TMDB agent.

I think you’ll be impressed with how fast the Preview agent is. You mentioned examples where IMDB has incorrect (US) release dates?

Hi Votts,

Yes, the TMDB agent lists the release dates by popularity for each language. That’s what I’m saying. Plex is not using the TMDB API correctly. TMDB provides a release date type (1 = Theatrical) for this reason. I’m not sure where the confusion is. It’s a quick and simple fix for any developer.

If you are looking for the most popular pizza joint you don’t just visit Yelp and go to the most popular restaurant listed. You have to first filter by pizza. Don’t blame Yelp when your sent to Red Lobster expecting pizza.

I’m not disagreeing that there’s an issue. I laughed when I hit Fix Match, saw the correct movie and correct year, and then the wrong date was still pulled in. :man_facepalming:

I agree that the TMDB agent has the problem you describe. Your explanation is the clearest I’ve seen on the forum. I tested with dummy files and agree it isn’t caused by MP4 metadata or Local Media Assets.

The Plex Movie agent gets much of the same data from TMDB as the TMDB agent, and their code is similar, but the Plex Movie agent has extra logic around dates and release selection, and it does a better job.

The TMDB agent code seems less sophisticated than the Plex Movie agent. I’m guessing that the new scanner/agent will get the most attention in the future. I would rather Plex focus on improving the new ones, so I’m hoping you give the same clear feedback there. That will make everything better for all of us. :slight_smile:

I don’t see the API query that you mentioned. Where is that called? I do see the agents using a combination of “name closeness” + “TMDB popularity” + “year closeness”. The Python itself is straightforward.

I don’t think the solution is as simple as Theatrical. Plenty of movies never got a theatrical release. I’ll bet some of the movies that came out streaming this year end up with a theatrical release. I’m suspicious that a bunch of “Theatrical” entries in TMDB are actually VHS/DVD/TV dates, too.

TMDB has a “Primary Release Date” concept that seems about right.
https://www.themoviedb.org/bible/movie/59f3b16d9251414f20000009?language=en-US

On the movies with bad dates, do you get correct ratings/certifications? Or are those missing too?

It looks to me like the way it parses through all of the release dates, it’s also likely to get wrong movie content ratings.

1941 = NR
Aguirre = nothing
Rudolph = nothing

I think I see exactly what it’s doing. In PlexMovie.bundle/Contents/Code/__init__.py, there’s a little bit of logic to set the release date from the TMDB primary release date if it exists, and then to NOT overwrite that.

In TheMovieDB.bundle, the same logic doesn’t exist. I don’t think it’s sorted or deterministic at all. I think it just uses “another” release date.